aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/api/client.ts
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-09-17 19:14:32 +0900
committernsfisis <nsfisis@gmail.com>2025-09-17 19:23:56 +0900
commitfaff26b13da82747fb0efdb6bf1312a9b14d3916 (patch)
treeeb510dc3f92bdb916ff5bdc1191763ff48cf4332 /frontend/app/api/client.ts
parent4615ca9b8b1989d315ae2322556697b97161b97b (diff)
downloadiosdc-japan-2025-albatross-faff26b13da82747fb0efdb6bf1312a9b14d3916.tar.gz
iosdc-japan-2025-albatross-faff26b13da82747fb0efdb6bf1312a9b14d3916.tar.zst
iosdc-japan-2025-albatross-faff26b13da82747fb0efdb6bf1312a9b14d3916.zip
feat(backend,frontend): implement tournament page
Diffstat (limited to 'frontend/app/api/client.ts')
-rw-r--r--frontend/app/api/client.ts17
1 files changed, 17 insertions, 0 deletions
diff --git a/frontend/app/api/client.ts b/frontend/app/api/client.ts
index 10dc7ef..6b7ce80 100644
--- a/frontend/app/api/client.ts
+++ b/frontend/app/api/client.ts
@@ -107,6 +107,23 @@ class AuthenticatedApiClient {
return data;
}
+ async getTournament(
+ game1: number,
+ game2: number,
+ game3: number,
+ game4: number,
+ game5: number,
+ ) {
+ const { data, error } = await client.GET("/tournament", {
+ params: {
+ header: this._getAuthorizationHeader(),
+ query: { game1, game2, game3, game4, game5 },
+ },
+ });
+ if (error) throw new Error(error.message);
+ return data;
+ }
+
_getAuthorizationHeader() {
return { Authorization: `Bearer ${this.token}` };
}