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
parent b88fc8ead7
commit 90c7325213

View File

@@ -46,11 +46,11 @@ export async function GET(request: NextRequest) {
client_ip,
stream
FROM ${TABLE_NAME}
WHERE timestamp >= NOW() - INTERVAL '${hours} hours'
WHERE timestamp >= NOW() - INTERVAL '$1 hours'
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;
// Get model breakdown