add retry for fetching game state

This commit is contained in:
AlecM33
2023-01-31 23:17:35 -05:00
parent bc986005c8
commit a99d19614c
3 changed files with 39 additions and 15 deletions

View File

@@ -36,8 +36,7 @@ router.patch('/restart', (req, res, next) => {
});
router.post('/create', gameEndpointLimiter, function (req, res) {
const gameCreationPromise = gameManager.createGame(req.body, false);
gameCreationPromise.then((result) => {
gameManager.createGame(req.body, false).then((result) => {
if (result instanceof Error) {
res.status(500).send();
} else {