use new get avatar api

This commit is contained in:
hjlarry
2025-09-10 15:15:31 +08:00
parent 89bedae0d3
commit f091868b7c
3 changed files with 57 additions and 3 deletions

View File

@ -397,3 +397,7 @@ export const resetEmail = (body: { new_email: string; token: string }) =>
export const checkEmailExisted = (body: { email: string }) =>
post<CommonResponse>('/account/change-email/check-email-unique', { body }, { silent: true })
export const getAvatar: Fetcher<{ avatar_url: string }, { avatar: string }> = ({ avatar }) => {
return get<{ avatar_url: string }>(`/account/avatar?avatar=${avatar}`)
}