fixed stats page to show correct number of skipped clues. reflected this change accurately in leaderboards for users and admins as to not create a bug where a skipped clue would contribute to progress

This commit is contained in:
bobbert committed 2025-03-18 22:35:04 +00:00
1 parent 2f9a6c732c
commit 4cd449c0cf
8 files changed
+46 -39

No files matched your search

+2 -1
View File
@@ -38,13 +38,14 @@ export async function GET(request) {
const totalClues = clueCountResult?.total || 0;
// Get all teams with member count and clues found
// Modified to exclude skipped clues from cluesFound count
const teams = await query(`
SELECT
t.id,
t.name,
t.code,
COUNT(DISTINCT u.id) as memberCount,
COUNT(DISTINCT tc.clue_id) as cluesFound,
COUNT(DISTINCT CASE WHEN tc.skipped = 0 OR tc.skipped IS NULL THEN tc.clue_id END) as cluesFound,
MAX(tc.found_at) as lastActivity
FROM
teams t