This commit is contained in:
2023-12-08 03:53:09 +01:00
parent 6e6bdc21ba
commit 20de98bc05

View File

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