mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 07:47:50 +01:00
redesign how players are added and how cards are dealt
This commit is contained in:
@@ -82,7 +82,8 @@ router.patch('/:code/players', async function (req, res) {
|
||||
gameManager.joinGame(game, req.body.playerName, inUseCookie, req.body.joinAsSpectator).then((data) => {
|
||||
res.status(200).send({ cookie: data, environment: gameManager.environment });
|
||||
}).catch((data) => {
|
||||
res.status(data.status).send(data.reason);
|
||||
console.error(data);
|
||||
res.status(data.status || 500).send(data.reason);
|
||||
});
|
||||
} else {
|
||||
res.status(404).send();
|
||||
|
||||
Reference in New Issue
Block a user