summary refs log tree commit diff
path: root/api/src/routes/guilds/#guild_id/widget.json.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
commit6ba9c834bd2d5f4fac07e3fb9ded2625ce3c44ad (patch)
tree27c5de63307dc170b0dfa02140b14a306ed55514 /api/src/routes/guilds/#guild_id/widget.json.ts
parent:construction: :sparkles: new body parser (bans route) (diff)
downloadserver-6ba9c834bd2d5f4fac07e3fb9ded2625ce3c44ad.tar.xz
:sparkles: #307 done
Diffstat (limited to 'api/src/routes/guilds/#guild_id/widget.json.ts')
-rw-r--r--api/src/routes/guilds/#guild_id/widget.json.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/routes/guilds/#guild_id/widget.json.ts b/api/src/routes/guilds/#guild_id/widget.json.ts
index f871fac8..c31519fa 100644
--- a/api/src/routes/guilds/#guild_id/widget.json.ts
+++ b/api/src/routes/guilds/#guild_id/widget.json.ts
@@ -1,7 +1,7 @@
 import { Request, Response, Router } from "express";
 import { Config, Permissions, Guild, Invite, Channel, Member } from "@fosscord/util";
 import { HTTPError } from "lambert-server";
-import { random } from "@fosscord/api";
+import { random, route } from "@fosscord/api";
 
 const router: Router = Router();
 
@@ -14,7 +14,7 @@ const router: Router = Router();
 
 // https://discord.com/developers/docs/resources/guild#get-guild-widget
 // TODO: Cache the response for a guild for 5 minutes regardless of response
-router.get("/", async (req: Request, res: Response) => {
+router.get("/", route({}), async (req: Request, res: Response) => {
 	const { guild_id } = req.params;
 
 	const guild = await Guild.findOneOrFail({ id: guild_id });