feat: rebuild support workspace frontend

This commit is contained in:
hailin
2026-07-16 17:20:45 +08:00
parent fcb8121f0a
commit e90648e129
95 changed files with 4353 additions and 2165 deletions

View File

@@ -6,6 +6,20 @@ export async function getCurrentUser() {
return apiRequest<CurrentUser>('/accounts/auth/me')
}
export function updateCurrentUser(payload: { display_name?: string; email?: string }) {
return apiRequest<CurrentUser>('/accounts/auth/me', {
method: 'PATCH',
body: JSON.stringify(payload)
})
}
export function changePassword(currentPassword: string, newPassword: string) {
return apiRequest<{ status: string }>('/accounts/auth/change-password', {
method: 'POST',
body: JSON.stringify({ current_password: currentPassword, new_password: newPassword })
})
}
export async function login(username: string, password: string) {
return apiRequest<CurrentUser>('/accounts/auth/login', {
method: 'POST',