Update src/client/api.ts
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user