mirror of
https://github.com/elyby/accounts-frontend.git
synced 2025-05-31 14:11:58 +05:30
Implemented handlers to delete/restore account. Implemented "account deleted" page
This commit is contained in:
@@ -86,3 +86,13 @@ export function confirmNewEmail(id: number, key: string): Promise<{ success: boo
|
||||
key,
|
||||
});
|
||||
}
|
||||
|
||||
export function deleteAccount(id: number, { password }: { password?: string }): Promise<{ success: boolean }> {
|
||||
return request.delete(`/api/v1/accounts/${id}`, {
|
||||
password,
|
||||
});
|
||||
}
|
||||
|
||||
export function restoreAccount(id: number): Promise<{ success: boolean }> {
|
||||
return request.post(`/api/v1/accounts/${id}/restore`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user