commit
This commit is contained in:
parent
ba50740aec
commit
06384b45d3
3 changed files with 6 additions and 6 deletions
|
@ -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"});
|
||||
}
|
||||
|
|
|
@ -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"});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue