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

fixed missing db delete call

This commit is contained in:
xnacly 2021-04-17 13:49:03 +01:00
parent 9d848bf3a9
commit 4aafcb569a

View File

@ -22,6 +22,9 @@ router.delete("/:invite_code", async (req: Request, res: Response) => {
const perms = await getPermission(req.user_id, guild_id, channel_id);
if (!perms.has("MANAGE_GUILD") || !perms.has("MANAGE_CHANNELS")) throw new HTTPError("You aren't allow", 401);
await InviteModel.deleteOne({ code }).exec();
res.status(200).send({ invite: toObject(invite) });
});