diff --git a/src/client/api.ts b/src/client/api.ts index f004f8b..ba5ffd2 100644 --- a/src/client/api.ts +++ b/src/client/api.ts @@ -45,7 +45,7 @@ var version_add = 1 export const save = async (id: string, v: journey) => { let body = JSON.parse(JSON.stringify(v)) 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) => { if (!res.ok) throw new Error("Error " + res.statusText); return res.json();