From ecc66a630b73c311e08f6e83adca6c41a1cc5edf Mon Sep 17 00:00:00 2001 From: Felix Albrigtsen Date: Fri, 25 Mar 2022 02:43:57 +0100 Subject: [PATCH] Fixed winner / team endpoints --- src/server/README.md | 2 +- src/server/index.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/server/README.md b/src/server/README.md index 0f340d5..0442f92 100644 --- a/src/server/README.md +++ b/src/server/README.md @@ -8,7 +8,7 @@ DB_HOST=mysql.stud.ntnu.no DB_USER=dbusername DB_PASSWORD=dbpassword -DB_DATABASE=dbnamei +DB_DATABASE=dbname ``` * Build the client (separate instructions) * Start the server `npm start` diff --git a/src/server/index.js b/src/server/index.js index cb2b020..8504eda 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -7,7 +7,7 @@ let tmdb = require("./tmdb.js"); // #region Express setup const app = express(); -const port = 3000; +const port = 3001; app.listen(port, () => { console.log(`Listening on port ${port}`) }) @@ -88,7 +88,6 @@ api.get("/match/:matchId/getMatch", (req, res) => { .catch(err => res.send({"status": "error", "data": err})); }); -// JSON body: {"winner": teamId} api.post("/match/:matchId/setWinner", (req, res) => { let matchId = req.params.matchId; let winnerId = req.body.winnerId;