diff --git a/backend/server.js b/backend/server.js index 69859c175..259597f70 100644 --- a/backend/server.js +++ b/backend/server.js @@ -23,7 +23,7 @@ app.use("/user", userRouter); const configRouter = require("./api/routes/config"); app.use("/config", configRouter); const resultRouter = require("./api/routes/result"); -app.use("/result", resultRouter); +app.use("/results", resultRouter); app.use(function (e, req, res, next) { console.log("Error", e); diff --git a/src/js/db.js b/src/js/db.js index 03f0a25a7..8f6a32e9e 100644 --- a/src/js/db.js +++ b/src/js/db.js @@ -112,7 +112,7 @@ export async function getUserResults() { return true; } else { try { - let results = await axiosInstance.get("/result"); + let results = await axiosInstance.get("/results"); dbSnapshot.results = results.data; return true; } catch (e) { diff --git a/src/js/test/test-logic.js b/src/js/test/test-logic.js index 5dc97f441..bd922d5ca 100644 --- a/src/js/test/test-logic.js +++ b/src/js/test/test-logic.js @@ -1688,7 +1688,7 @@ export function finish(difficultyFailed = false) { Notifications.add("You are offline. Result not saved.", -1); } else { axiosInstance - .post("/result/add", { + .post("/results/add", { result: completedEvent, }) .then((response) => {