summary refs log tree commit diff
path: root/src/routes/guilds/#guild_id/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/guilds/#guild_id/index.ts')
-rw-r--r--src/routes/guilds/#guild_id/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/routes/guilds/#guild_id/index.ts b/src/routes/guilds/#guild_id/index.ts
index 96861e48..2a7d9b38 100644
--- a/src/routes/guilds/#guild_id/index.ts
+++ b/src/routes/guilds/#guild_id/index.ts
@@ -41,7 +41,7 @@ router.patch("/", check(GuildUpdateSchema), async (req: Request, res: Response)
 	// TODO: guild update check image
 
 	const perms = await getPermission(req.user_id, guild_id);
-	if (!perms.has("MANAGE_GUILD")) throw new HTTPError("You do not have the MANAGE_GUILD permission", 401);
+	perms.hasThrow("MANAGE_GUILD");
 
 	const guild = await GuildModel.findOneAndUpdate({ id: guild_id }, body)
 		.populate({ path: "joined_at", match: { id: req.user_id } })