feat(settings): let users delete their account
Build, Test & Push Frontend / quality-check (push) Successful in 16s
Build, Test & Push Frontend / docker (push) Successful in 26s

This commit is contained in:
lobo committed 2026-09-27 11:46:22 +02:00
1 parent cfceca5e5e
commit 46587dfb5c
8 files changed
+374 -2

No files matched your search

+11
View File
@@ -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}),
});