Update templates.ts

This commit is contained in:
Intevel ツ
2021-05-06 22:19:56 +02:00
parent be50cc3d35
commit 7488f03f82
+2 -2
View File
@@ -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