Fix me pls?

This commit is contained in:
Stian Fredrik Aune
2020-09-04 20:32:43 +02:00
parent 908a2ebfe9
commit b23e16b4f6
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ function sendRequest(path, method, body, sendResp) {
headers: method !== "GET" ? {
"Content-Type": "application/json",
} : undefined,
body: body ? JSON.stringify(body) : undefined,
body: body !== null ? JSON.stringify(body) : undefined,
}).then(r => r.json())
.then(data => sendResp({success: true, data}))
.catch(e => sendResp({success: false, message: e.message}));
+1 -1
View File
@@ -14,7 +14,7 @@ export async function createNewWorkout(bike, program) {
const bikeId = bike.id;
const programId = program.id;
return await runBack({query: "fetchActiveWorkouts", bikeId, programId});
return await runBack({query: "createNewWorkout", bikeId, programId});
}
export async function connectWorkout(workout) {