diff options
author | binsky <timo@binsky.org> | 2022-04-09 04:12:16 +0200 |
---|---|---|
committer | Erkin Alp Güney <erkinalp9035@gmail.com> | 2022-04-09 08:30:29 +0300 |
commit | 88dd33a9a271ec73f9ce0beb8c5c8e662912fc68 (patch) | |
tree | 8ca0d4dd246abef336764f093af5fe645b6bc97d /api | |
parent | fix invite right enforcement (diff) | |
download | server-88dd33a9a271ec73f9ce0beb8c5c8e662912fc68.tar.xz |
fix MANAGE_GUILDS; rename getRight to getRights
Diffstat (limited to 'api')
-rw-r--r-- | api/src/routes/guilds/#guild_id/index.ts | 4 |
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 |