diff options
Diffstat (limited to 'frontend/app/.server/api/client.ts')
| -rw-r--r-- | frontend/app/.server/api/client.ts | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/frontend/app/.server/api/client.ts b/frontend/app/.server/api/client.ts index 0db4c14..aae1723 100644 --- a/frontend/app/.server/api/client.ts +++ b/frontend/app/.server/api/client.ts @@ -8,9 +8,19 @@ const apiClient = createClient<paths>({ : "http://api-server/api/", }); -export async function apiPostLogin(username: string, password: string) { +export async function apiPostLogin( + username: string, + password: string, + registrationToken: string | null, +) { const { data, error } = await apiClient.POST("/login", { - body: { username, password }, + body: { + username, + password, + ...(registrationToken !== null + ? { registration_token: registrationToken } + : {}), + }, }); if (error) throw new Error(error.message); return data; |
