mirror of
https://github.com/AlecM33/Werewolf.git
synced 2025-12-26 07:47:50 +01:00
set content type for join errors (#207)
This commit is contained in:
@@ -83,9 +83,11 @@ router.patch('/:code/players', async function (req, res) {
|
||||
res.status(200).send({ cookie: data, environment: gameManager.environment });
|
||||
}).catch((data) => {
|
||||
console.error(data);
|
||||
res.set('content-type', 'text/plain');
|
||||
res.status(data.status || 500).send(data.reason);
|
||||
});
|
||||
} else {
|
||||
res.set('content-type', 'text/plain');
|
||||
res.status(404).send();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user