Feature: Suppression de son compte
This commit is contained in:
+6
-2
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user