fixed missing db delete call
This commit is contained in:
		
							parent
							
								
									9d848bf3a9
								
							
						
					
					
						commit
						4aafcb569a
					
				| @ -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) }); | ||||
| }); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 xnacly
						xnacly