Bug de rafraichissement de données

This commit is contained in:
2026-07-05 10:50:17 +02:00
parent 186ffc2596
commit 0d8f92bc9a
4 changed files with 52 additions and 3 deletions
+2 -2
View File
@@ -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();
}),