1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-11 05:02:37 +01:00

Update delete.ts

This commit is contained in:
Bloom Sirenix 2021-05-22 23:56:04 +02:00 committed by GitHub
parent e874a946af
commit 2c077dfa04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ router.post("/", async (req: Request, res: Response) => {
let correctpass = await bcrypt.compare(req.body.password,user!.user_data.hash) //Not sure if user typed right password :/
if(correctpass){
await UserModel.deleteOne({id: req.user_id}).exec() //Yeetus the feetus user deletus
await UserModel.deleteOne({id: req.user_id}).exec() //Yeetus user deletus
res.sendStatus(204);
}