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 | edc5426369f31d4ad70f54ab8cbece5482738f7e (patch) | |
tree | ddcc73af798382d171b68690586ff3ff774231e3 /api/src/routes/guilds/#guild_id/index.ts | |
parent | fix invite right enforcement (diff) | |
download | server-edc5426369f31d4ad70f54ab8cbece5482738f7e.tar.xz |
fix MANAGE_GUILDS; rename getRight to getRights
Diffstat (limited to '')
-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 |