converted routes to plural

This commit is contained in:
Miodec 2021-07-08 22:22:18 +01:00
parent 5306f82ec7
commit 557f96c362
3 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -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) {

View file

@ -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) => {