mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-06 19:02:33 +01:00
Update api/src/routes/stop.ts
Co-authored-by: Erkin Alp Güney <erkinalp9035@gmail.com>
This commit is contained in:
parent
31c66d0f5e
commit
4cf4de805b
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user