Feat: support account deletion (#10008)

This commit is contained in:
NFish
2024-12-30 13:39:26 +08:00
committed by GitHub
parent 74d3320519
commit adacd01f82
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 })