Update route.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Praveen Thirumurugan
2025-11-19 07:21:21 +05:30
committed by GitHub
co-authored by Copilot
parent b88fc8ead7
commit 90c7325213
+3 -3
View File
@@ -46,11 +46,11 @@ export async function GET(request: NextRequest) {
client_ip, client_ip,
stream stream
FROM ${TABLE_NAME} FROM ${TABLE_NAME}
WHERE timestamp >= NOW() - INTERVAL '${hours} hours' WHERE timestamp >= NOW() - INTERVAL '$1 hours'
ORDER BY timestamp DESC ORDER BY timestamp DESC
LIMIT ${limit} LIMIT $2
`; `;
const recentResult = await client.query(recentQuery); const recentResult = await client.query(recentQuery, [hours, limit]);
const recentRequests = recentResult.rows; const recentRequests = recentResult.rows;
// Get model breakdown // Get model breakdown