mirror of
https://github.com/mudabbir-ahmad/peworkshop.git
synced 2026-10-07 19:50:20 +00:00
map WIP
This commit is contained in:
1 parent
c5f2c0a98a
commit
25e877cc3a
6 files changed
+490
-154
No files matched your search
@@ -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 },
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user