There was an error while loading. Please reload this page.
1 parent 8878c38 commit 882e318Copy full SHA for 882e318
2 files changed
apps/api/prisma/migrations/20251123203433_/migration.sql
@@ -0,0 +1,4 @@
1
+-- Clear Streak and StreakGame tables
2
+
3
+DELETE FROM "StreakGame";
4
+DELETE FROM "Streak";
apps/api/src/app/getters/getStreaks.ts
@@ -49,7 +49,7 @@ export const getStreaksByPlayer = async (player: { id: Player['id'] }) => {
49
}))
50
51
const winChars = games.filter((game) => game.isWin).map((game) => game.char)
52
- const isUniqueByChar = new Set(winChars).size === games.length
+ const isUniqueByChar = new Set(winChars).size === winChars.length
53
const isMono = new Set(winChars).size === 1
54
const type: StreakType = isUniqueByChar
55
? StreakType.UNIQUE
0 commit comments