This commit is contained in:
bobbert committed 2025-03-16 21:40:28 +00:00
1 parent c5f2c0a98a
commit 25e877cc3a
6 files changed
+490 -154

No files matched your search

+4 -1
View File
@@ -17,13 +17,16 @@ export async function GET(request) {
return Response.json({ error: "Unauthorized access" }, { status: 401 });
}
// Get the total count of clues
// Get the total count of clues with a direct SQL COUNT query
const result = await queryOne("SELECT COUNT(*) as count FROM clues");
if (!result) {
return Response.json({ error: "Failed to count clues" }, { status: 500 });
}
// Log the count to help with debugging
console.log(`API: Returning clue count: ${result.count}`);
return Response.json(
{ count: result.count },
{