mirror of
https://github.com/pupperpowell/bibdle.git
synced 2026-04-05 17:33:31 -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:
@@ -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