sendou.ink/app/features/api-public/routes
Kalle 4bc8033841 Collapse repeated manual badge grants into a count column
TournamentBadgeOwner previously stored manual grants as N identical
rows to represent "this user has this badge N times" — one user had
12,345 duplicate rows for a single badge. This adds a `count` column,
collapses NULL-tournamentId duplicates in the backfill, and rewrites
the BadgeOwner view to expose count via SUM. The table shrinks from
75,596 to 24,204 rows. Also adds an index on TournamentBadgeOwner(userId)
as defense-in-depth for direct lookups, and updates replaceOwners to
dedupe ownerIds at insert time. Profile-page query for the worst-case
user drops from ~4 ms to ~1–2 ms warm.
2026-05-14 18:09:41 +03:00
..
api.layout.tsx Add/remove member write API (#2774) 2026-01-25 22:13:00 +02:00
calendar.$year.$week.ts Add/remove member write API (#2774) 2026-01-25 22:13:00 +02:00
org.$id.ts Add/remove member write API (#2774) 2026-01-25 22:13:00 +02:00
sendouq.active-match.$userId.ts Add/remove member write API (#2774) 2026-01-25 22:13:00 +02:00
sendouq.match.$matchId.ts Add/remove member write API (#2774) 2026-01-25 22:13:00 +02:00
team.$id.ts Add/remove member write API (#2774) 2026-01-25 22:13:00 +02:00
tournament-match.$id.ts New match page (#3032) 2026-05-04 18:15:10 +03:00
tournament.$id.brackets.$bidx.standings.ts Add/remove member write API (#2774) 2026-01-25 22:13:00 +02:00
tournament.$id.brackets.$bidx.ts Add/remove member write API (#2774) 2026-01-25 22:13:00 +02:00
tournament.$id.casted.ts Allow locking a tournament match for a specific stream 2026-03-28 14:38:46 +02:00
tournament.$id.players.ts New match page (#3032) 2026-05-04 18:15:10 +03:00
tournament.$id.seeds.ts Add public write API for seeds and starting brackets (#2827) 2026-02-22 16:54:08 +02:00
tournament.$id.starting-brackets.ts Add public write API for seeds and starting brackets (#2827) 2026-02-22 16:54:08 +02:00
tournament.$id.streams.ts Add /api/tournament/:id/streams route (#3067) 2026-05-14 16:33:36 +03:00
tournament.$id.teams.$teamId.add-member.ts Add/remove member write API (#2774) 2026-01-25 22:13:00 +02:00
tournament.$id.teams.$teamId.remove-member.ts Add/remove member write API (#2774) 2026-01-25 22:13:00 +02:00
tournament.$id.teams.$teamId.update-member-ign.ts Public API for changing IGN in tournaments (#2860) 2026-03-03 18:46:52 +02:00
tournament.$id.teams.ts Remove redundant isOwner column (#2944) 2026-04-06 15:21:15 +03:00
tournament.$id.ts Fix a few missing isPlaceholder filters in tournament team queries 2026-03-27 20:46:10 +02:00
user.$identifier.ids.ts Fix HTTP OPTIONS request to /api/ (#2697) 2026-01-04 22:03:21 +02:00
user.$identifier.ts Collapse repeated manual badge grants into a count column 2026-05-14 18:09:41 +03:00