From 9f9efc2bc07810d2e06b37bad94e5922681eadef Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 18 Feb 2026 22:38:15 +0900 Subject: feat: refactor tournament to generic DB-backed N-person bracket Replace hardcoded 6-person tournament with a generic single-elimination bracket system backed by new DB tables (tournaments, tournament_entries, tournament_matches). Includes admin CRUD, standard seeding algorithm, bye handling, and a CSS Grid bracket renderer on the frontend. Add comprehensive tests for backend API/admin handlers, seeding logic, and frontend bracket component. Co-Authored-By: Claude Opus 4.6 --- frontend/app/api/client.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'frontend/app/api/client.ts') diff --git a/frontend/app/api/client.ts b/frontend/app/api/client.ts index 26c20d1..c9647ba 100644 --- a/frontend/app/api/client.ts +++ b/frontend/app/api/client.ts @@ -108,16 +108,10 @@ class AuthenticatedApiClient { return data; } - async getTournament( - game1: number, - game2: number, - game3: number, - game4: number, - game5: number, - ) { - const { data, error } = await client.GET("/tournament", { + async getTournament(tournamentId: number) { + const { data, error } = await client.GET("/tournaments/{tournament_id}", { params: { - query: { game1, game2, game3, game4, game5 }, + path: { tournament_id: tournamentId }, }, }); if (error) throw new Error(error.message); -- cgit v1.3.1