added useApi and useApiQuery to work seamlessly with SWR (tbc)

This commit is contained in:
dswbx
2024-12-12 10:37:52 +01:00
parent 43ec075a32
commit 9d9aa7b7a5
10 changed files with 72 additions and 24 deletions

View File

@@ -29,11 +29,11 @@ export class AuthApi extends ModuleApi<AuthApiOptions> {
return res;
}
async me() {
me() {
return this.get<{ user: SafeUser | null }>(["me"]);
}
async strategies() {
strategies() {
return this.get<Pick<AppAuthSchema, "strategies" | "basepath">>(["strategies"]);
}