Update src/client/api.ts
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-08-13 10:46:12 +02:00
parent 92cf9cf013
commit e03d20429b

View File

@@ -45,7 +45,7 @@ var version_add = 1
export const save = async (id: string, v: journey) => { export const save = async (id: string, v: journey) => {
let body = JSON.parse(JSON.stringify(v)) let body = JSON.parse(JSON.stringify(v))
body.version +=version_add; body.version +=version_add;
return fetch("/api/" + id, { method: "post", body: JSON.stringify(body) }) return fetch("/api/" + id, { method: "post", headers:{"Content-Type": "application/json"},body: JSON.stringify(body) })
.then((res) => { .then((res) => {
if (!res.ok) throw new Error("Error " + res.statusText); if (!res.ok) throw new Error("Error " + res.statusText);
return res.json(); return res.json();