Ongoing workout session data is persistent now

This commit is contained in:
AG
2025-11-28 19:00:56 +02:00
parent 4c632e164e
commit d07431e4ff
10 changed files with 375 additions and 48 deletions

View File

@@ -27,6 +27,15 @@ export const api = {
if (!res.ok) throw new Error(await res.text());
return res.json();
},
put: async (endpoint: string, data: any) => {
const res = await fetch(`${API_URL}${endpoint}`, {
method: 'PUT',
headers: headers(),
body: JSON.stringify(data)
});
if (!res.ok) throw new Error(await res.text());
return res.json();
},
delete: async (endpoint: string) => {
const res = await fetch(`${API_URL}${endpoint}`, {
method: 'DELETE',