Skip to content
Snippets Groups Projects
Commit b3a495c8 authored by Tobias Ørstad's avatar Tobias Ørstad
Browse files

Fixes

parent 38cd8c90
No related branches found
No related tags found
1 merge request!96Resolve "Backend cleanup"
......@@ -68,7 +68,6 @@ module.exports = {
{
$pull: { players: { $in: players } },
$inc: { currentPlayers: -players.length },
$set: { active: !end },
},
(err, result) => {
if (err) {
......
......@@ -195,6 +195,11 @@ router.post("/join", (req, res) => {
res.sendStatus(500); // Internal server error
return;
}
if (!req.body.playerId) {
res.sendStatus(400);
return;
}
let playerId;
try {
playerId = mongo.ObjectID(req.body.playerId);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment