This commit is contained in:
Lukian LEIZOUR 2024-06-02 18:05:32 +02:00
parent ba50740aec
commit 06384b45d3
3 changed files with 6 additions and 6 deletions

View file

@ -25,7 +25,7 @@ router.post('/', async (req, res) => {
return res.status(400).send({error: "you are already an helper for this game"});
}
await addHelper(user.user.id, gameid);
await addHelper(user.user.username, gameid);
} catch {
return res.status(400).send({error: "invalid token"});
}

View file

@ -14,7 +14,7 @@ router.post('/', async (req, res) => {
try {
const user = jwt.verify(token, process.env.JWTSecret);
await removeHelper(user.user.id, gameid);
await removeHelper(user.user.username, gameid);
} catch {
return res.status(400).send({error: "invalid token"});
}