From 20de98bc052337cc8ee0f0e5c1dcc83b89a0b070 Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Fri, 8 Dec 2023 03:53:09 +0100 Subject: [PATCH] Fix --- api/routes/games.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/routes/games.js b/api/routes/games.js index 803d479..2081c90 100644 --- a/api/routes/games.js +++ b/api/routes/games.js @@ -7,7 +7,7 @@ import { Game, Question } from '../Classes/Games.js'; const router = express.Router(); router.post('/create/:theme', verifyToken, async (req, res) => { - const game = new Game(null, req.user.id); + const game = new Game(null, req.userId); await game.create(); await game.generateQuestions(req.params.theme); return await respondWithStatusJSON(res, 200, {