Bug de rafraichissement de données
This commit is contained in:
+2
-2
@@ -34,7 +34,7 @@ export const api = {
|
||||
const qs = params ? '?' + new URLSearchParams(
|
||||
Object.entries(params).filter(([, v]) => v !== undefined && v !== null && v !== '')
|
||||
).toString() : '';
|
||||
return fetch(BASE + path + qs, { headers: authHeaders() }).then(handle);
|
||||
return fetch(BASE + path + qs, { headers: authHeaders(), cache: 'no-store' }).then(handle);
|
||||
},
|
||||
post: (path, body) =>
|
||||
fetch(BASE + path, {
|
||||
@@ -65,7 +65,7 @@ export const api = {
|
||||
postForm: (path, formData) =>
|
||||
fetch(BASE + path, { method: 'POST', body: formData, headers: authHeaders() }).then(handle),
|
||||
blob: (path) =>
|
||||
fetch(BASE + path, { headers: authHeaders() }).then(async res => {
|
||||
fetch(BASE + path, { headers: authHeaders(), cache: 'no-store' }).then(async res => {
|
||||
if (!res.ok) { const t = await res.text(); throw new Error(t || res.statusText); }
|
||||
return res.blob();
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user