fully validate game creation parameters sent through the API

This commit is contained in:
AlecM33
2022-12-29 17:05:09 -05:00
parent e0dffe17b6
commit 66698500b9
7 changed files with 67 additions and 12 deletions

View File

@@ -36,7 +36,6 @@ router.patch('/restart', (req, res, next) => {
});
router.post('/create', gameEndpointLimiter, function (req, res) {
logger.debug('Received request to create new game: ' + JSON.stringify(req.body, null, 4));
const gameCreationPromise = gameManager.createGame(req.body, false);
gameCreationPromise.then((result) => {
if (result instanceof Error) {