Fix invalid game state
Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
parent
302826b5e5
commit
7f813ff2bd
@ -359,8 +359,12 @@ router.get("/:id", async (req, res/*, next*/) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
error = `Game ${id} not found -- returning invalid game state.`;
|
error = `Game ${id} not found -- returning invalid game state.`;
|
||||||
console.warn(error);
|
const invalid = {
|
||||||
return sendGame(res, req, { id: id, state: 'invalid' }, error);
|
id: id,
|
||||||
|
players: {},
|
||||||
|
state: 'invalid'
|
||||||
|
};
|
||||||
|
return sendGame(res, req, invalid, error);
|
||||||
});
|
});
|
||||||
|
|
||||||
router.put("/:id", (req, res/*, next*/) => {
|
router.put("/:id", (req, res/*, next*/) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user