whoopsie x2

This commit is contained in:
Lain Iwakura 2025-06-16 01:41:09 +03:00
parent 0845621f0e
commit d5b33ff00d
No known key found for this signature in database
GPG Key ID: C7C18257F2ADC6F8

View File

@ -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) {