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:
parent
76c41d905a
commit
bb695969fe
@ -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