From 7488f03f829a1994ce7c2abd685b1b4259b3108e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Intevel=20=E3=83=84?= <59223342+Intevel@users.noreply.github.com> Date: Thu, 6 May 2021 22:19:56 +0200 Subject: [PATCH] Update templates.ts --- src/routes/guilds/#guild_id/templates.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/guilds/#guild_id/templates.ts b/src/routes/guilds/#guild_id/templates.ts index 0690f0a4..a380ac2f 100644 --- a/src/routes/guilds/#guild_id/templates.ts +++ b/src/routes/guilds/#guild_id/templates.ts @@ -117,10 +117,10 @@ router.patch("/:template_id", check(TemplateModifySchema), async (req: Request, const template = await TemplateModel.findById({ _id: template_id }).exec(); if (!template) throw new HTTPError("template 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); var templateobj = await TemplateModel.findByIdAndUpdate({ _id: template_id