From a53d728104ac448bcd35e9dce13357f56a21d59e Mon Sep 17 00:00:00 2001 From: Intevel ツ <59223342+Intevel@users.noreply.github.com> Date: Thu, 6 May 2021 23:01:55 +0200 Subject: Update templates.ts --- src/routes/guilds/#guild_id/templates.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/routes') diff --git a/src/routes/guilds/#guild_id/templates.ts b/src/routes/guilds/#guild_id/templates.ts index 7b820779..61b2f9d0 100644 --- a/src/routes/guilds/#guild_id/templates.ts +++ b/src/routes/guilds/#guild_id/templates.ts @@ -30,10 +30,10 @@ router.post("/", check(TemplateCreateSchema), async (req: Request, res: Response const user = await UserModel.findOne({ id: req.user_id }).exec(); if (!user) throw new HTTPError("User not found", 404); - /*const perms = await getPermission(req.user_id, guild_id); + const perms = await getPermission(req.user_id, guild_id); if (!perms.has("MANAGE_GUILD")) - throw new HTTPError("You missing the MANAGE_GUILD permission", 401);*/ + throw new HTTPError("You missing the MANAGE_GUILD permission", 401); const template_id = Snowflake.generate(); -- cgit 1.4.1