Feature: Suppression de son compte

This commit is contained in:
2026-07-03 19:49:32 +02:00
parent 89190c4561
commit 2281894802
6 changed files with 169 additions and 5 deletions
+6 -2
View File
@@ -54,8 +54,12 @@ export const api = {
headers: { 'Content-Type': 'application/json', ...authHeaders() },
body: JSON.stringify(body),
}).then(handle),
del: (path) =>
fetch(BASE + path, { method: 'DELETE', headers: authHeaders() }).then(handle),
del: (path, body) =>
fetch(BASE + path, {
method: 'DELETE',
headers: body ? { 'Content-Type': 'application/json', ...authHeaders() } : authHeaders(),
...(body ? { body: JSON.stringify(body) } : {}),
}).then(handle),
upload: (path, formData) =>
fetch(BASE + path, { method: 'POST', body: formData, headers: authHeaders() }).then(handle),
postForm: (path, formData) =>