summary refs log tree commit diff
path: root/api/src/routes/guilds/#guild_id/delete.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-12 23:28:56 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-09-12 23:28:56 +0200
commit0b5534bc4144d6c708b19b1890b73eb56016e123 (patch)
tree4f17716499b03ba7ee395a7ab6f90df97a41ea46 /api/src/routes/guilds/#guild_id/delete.ts
parent:construction: :sparkles: new body parser (bans route) (diff)
downloadserver-0b5534bc4144d6c708b19b1890b73eb56016e123.tar.xz
:sparkles: #307 done
Diffstat (limited to 'api/src/routes/guilds/#guild_id/delete.ts')
-rw-r--r--api/src/routes/guilds/#guild_id/delete.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/routes/guilds/#guild_id/delete.ts b/api/src/routes/guilds/#guild_id/delete.ts
index bbbd1fa4..7c3c5530 100644
--- a/api/src/routes/guilds/#guild_id/delete.ts
+++ b/api/src/routes/guilds/#guild_id/delete.ts
@@ -1,12 +1,13 @@
 import { Channel, emitEvent, GuildDeleteEvent, Guild, Member, Message, Role, Invite, Emoji } from "@fosscord/util";
 import { Router, Request, Response } from "express";
 import { HTTPError } from "lambert-server";
+import { route } from "@fosscord/api";
 
 const router = Router();
 
 // discord prefixes this route with /delete instead of using the delete method
 // docs are wrong https://discord.com/developers/docs/resources/guild#delete-guild
-router.post("/", async (req: Request, res: Response) => {
+router.post("/", route({}), async (req: Request, res: Response) => {
 	var { guild_id } = req.params;
 
 	const guild = await Guild.findOneOrFail({ where: { id: guild_id }, select: ["owner_id"] });