mirror of
https://github.com/pupperpowell/bibdle.git
synced 2026-10-22 13:54:10 -04:00
fix: prevent single-day streaks from being shown
A streak requires at least 2 consecutive days. Return 0 when the count is less than 2 so the streak counter is not displayed after completing only today's puzzle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
3ee7331510
commit
03429b17cc
1 file changed
+1
-1
@@ -32,5 +32,5 @@ export const GET: RequestHandler = async ({ url }) => {
|
|||||||
cursor.setDate(cursor.getDate() - 1);
|
cursor.setDate(cursor.getDate() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return json({ streak });
|
return json({ streak: streak < 2 ? 0 : streak });
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user