diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-18 22:38:15 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-18 22:38:15 +0900 |
| commit | 9f9efc2bc07810d2e06b37bad94e5922681eadef (patch) | |
| tree | 79bcce2bf065a7ea282aa7855822c3bdee92ee7c /frontend/app/api/client.ts | |
| parent | c095200dc79f24c0cd17a2e3ba15c85a2971ea9a (diff) | |
| download | phperkaigi-2026-albatross-9f9efc2bc07810d2e06b37bad94e5922681eadef.tar.gz phperkaigi-2026-albatross-9f9efc2bc07810d2e06b37bad94e5922681eadef.tar.zst phperkaigi-2026-albatross-9f9efc2bc07810d2e06b37bad94e5922681eadef.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'frontend/app/api/client.ts')
| -rw-r--r-- | frontend/app/api/client.ts | 12 |
1 files changed, 3 insertions, 9 deletions
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); |
