Public Access
feat(settings): let users delete their account
This commit is contained in:
1 parent
cfceca5e5e
commit
46587dfb5c
8 files changed
+374
-2
No files matched your search
@@ -0,0 +1,11 @@
|
||||
import {apiFetch} from './api.js';
|
||||
|
||||
/**
|
||||
* DELETE /api/users/me on Auth: 204 (cookies cleared), 403 INVALID_PASSWORD, 429 with Retry-After in seconds.
|
||||
*/
|
||||
export const deleteAccount = (password) =>
|
||||
apiFetch(`${import.meta.env.VITE_API_URL}/api/users/me`, {
|
||||
method: 'DELETE',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({password}),
|
||||
});
|
||||
Reference in new issue
Block a user