server creation

This commit is contained in:
Fran Jurmanović
2025-09-18 01:34:16 +02:00
parent b7999b02e8
commit b0ee67c2be
21 changed files with 1542 additions and 82 deletions

View File

@@ -33,3 +33,12 @@ export async function getCurrentUser(token: string): Promise<User> {
const response = await fetchServerAPI<User>(`${authRoute}/me`, token);
return response.data!;
}
export async function getOpenToken(token: string): Promise<string> {
const response = await fetchServerAPI<{ token: string }>(
`${authRoute}/open-token`,
token,
'POST'
);
return response.data!.token;
}