Feat: support account deletion (#10008)

This commit is contained in:
NFish 2024-12-30 13:39:26 +08:00 • committed by GitHub
commit adacd01f82
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 316 additions and 346 deletions

View file

@ -339,3 +339,12 @@ export const sendResetPasswordCode = (email: string, language = 'en-US') =>
export const verifyResetPasswordCode = (body: { email: string;code: string;token: string }) =>
post<CommonResponse & { is_valid: boolean }>('/forgot-password/validity', { body })
export const sendDeleteAccountCode = () =>
get<CommonResponse & { data: string }>('/account/delete/verify')
export const verifyDeleteAccountCode = (body: { code: string;token: string }) =>
post<CommonResponse & { is_valid: boolean }>('/account/delete', { body })
export const submitDeleteAccountFeedback = (body: { feedback: string;email: string }) =>
post<CommonResponse>('/account/delete/feedback', { body })