aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/app/api/client.ts
diff options
context:
space:
mode:
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}` };
}