feat: Add light/dark mode support with backend persistence
This commit is contained in:
@@ -9,6 +9,7 @@ export interface UserResponse {
|
||||
id: string
|
||||
email: string
|
||||
display_name?: string
|
||||
theme_preference: string
|
||||
}
|
||||
|
||||
export const AuthService = {
|
||||
@@ -49,4 +50,9 @@ export const AuthService = {
|
||||
async logout() {
|
||||
await api.post("/auth/logout")
|
||||
},
|
||||
|
||||
async updateTheme(theme: string): Promise<UserResponse> {
|
||||
const response = await api.patch<UserResponse>("/auth/theme", { theme })
|
||||
return response.data
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user