feat(frontend): Implement silent refresh logic

This commit is contained in:
Yunxiao Xu
2026-02-18 13:43:37 -08:00
parent d11f3dd00c
commit 5adc826cfb
3 changed files with 41 additions and 0 deletions

View File

@@ -52,6 +52,11 @@ export const AuthService = {
await api.post("/auth/logout")
},
async refreshSession(): Promise<AuthResponse> {
const response = await api.post<AuthResponse>("/auth/refresh")
return response.data
},
async updateTheme(theme: Theme): Promise<UserResponse> {
const response = await api.patch<UserResponse>("/auth/theme", { theme })
return response.data