feat: rebuild support workspace frontend
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user