summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--api/src/routes/guilds/#guild_id/index.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/api/src/routes/guilds/#guild_id/index.ts b/api/src/routes/guilds/#guild_id/index.ts
index 8e1e74f7..4ec3df72 100644
--- a/api/src/routes/guilds/#guild_id/index.ts
+++ b/api/src/routes/guilds/#guild_id/index.ts
@@ -42,11 +42,11 @@ router.patch("/", route({ body: "GuildUpdateSchema"}), async (req: Request, res:
 	const { guild_id } = req.params;
 	
 	
-	const rights = await getRight(req.user_id);
+	const rights = await getRights(req.user_id);
 	const permission = await getPermission(req.user_id, guild_id);
 	
 	if (!rights.has("MANAGE_GUILDS")||!permission.has("MANAGE_GUILD"))
-		throw DiscordApiErrors.MISSING_PERMISSIONS("MANAGE_GUILD");
+		throw DiscordApiErrors.MISSING_PERMISSIONS.withParams("MANAGE_GUILD");
 	
 	// TODO: guild update check image