1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-06 10:52:31 +01:00

Update api/src/routes/stop.ts

Co-authored-by: Erkin Alp Güney <erkinalp9035@gmail.com>
This commit is contained in:
unknownPerson115 2021-12-25 15:33:55 -06:00 committed by GitHub
parent 31c66d0f5e
commit 4cf4de805b

View File

@ -13,13 +13,8 @@ router.post("/", route({}), async (req: Request, res: Response) => {
res.sendStatus(200)
process.kill(process.pid, 'SIGTERM')
}
if(user.flags <= '4095') {
console.log("user that POSTed to the /stop API was DENIED");
console.log(user.flags);
res.sendStatus(403)
}
if(user.flags >= '4097'){
console.log("user that POSTed to the /stop API was DENIED");
else {
console.log("operation failed");
console.log(user.flags);
res.sendStatus(403)
}