feat: auth client middleware

This commit is contained in:
Nicolas Meienberger
2025-10-02 21:28:08 +02:00
parent 0120641e3a
commit 2be7e18ab5
15 changed files with 368 additions and 46 deletions

View File

@@ -68,6 +68,10 @@ export const register = <ThrowOnError extends boolean = false>(options?: Options
return (options?.client ?? _heyApiClient).post<RegisterResponses, RegisterErrors, ThrowOnError>({
url: "/api/v1/auth/register",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
};
@@ -78,6 +82,10 @@ export const login = <ThrowOnError extends boolean = false>(options?: Options<Lo
return (options?.client ?? _heyApiClient).post<LoginResponses, LoginErrors, ThrowOnError>({
url: "/api/v1/auth/login",
...options,
headers: {
"Content-Type": "application/json",
...options?.headers,
},
});
};