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, {