Public Access
12 lines
392 B
JavaScript
12 lines
392 B
JavaScript
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}),
|
|
});
|