mirror of
https://git.sr.ht/~iwakuralain/text0Nly
synced 2025-07-27 07:30:31 +00:00
whoopsie x2
This commit is contained in:
parent
0845621f0e
commit
d5b33ff00d
@ -18,8 +18,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
|
||||
$limit = min(max(1, $limit), 100);
|
||||
|
||||
try {
|
||||
$stmt = $db->prepare('SELECT username, message, created_at, signature, is_encrypted FROM messages ORDER BY created_at DESC LIMIT ?');
|
||||
$stmt->execute([$limit]);
|
||||
$stmt = $db->query("SELECT username, message, created_at, signature, is_encrypted FROM messages ORDER BY created_at DESC LIMIT $limit");
|
||||
$messages = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
echo json_encode(['messages' => $messages]);
|
||||
} catch (Exception $e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user