fix admin endpoint

This commit is contained in:
AlecM33
2022-07-21 21:48:38 -04:00
parent 6b9c2309c3
commit 5cf6159d5b

View File

@@ -48,7 +48,11 @@ router.post('/sockets/broadcast', function (req, res) {
});
router.get('/games/state', function (req, res) {
res.status(200).send(gameManager.activeGameRunner.activeGames);
const gamesArray = [];
for (const key of gameManager.activeGameRunner.activeGames.keys()) {
gamesArray.push(gameManager.activeGameRunner.activeGames.get(key));
}
res.status(200).send(gamesArray);
});
router.put('/games/state', function (req, res) {