summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
authorErkin Alp Güney <erkinalp9035@gmail.com>2022-04-08 11:34:01 +0300
committerGitHub <noreply@github.com>2022-04-08 11:34:01 +0300
commita8c57a878d15ba1e3a6bc10ec2e61251c500a26e (patch)
treedf75aea22e148ea8cf8d43618ae1204210345eb2 /api
parentJOIN_GUILDS (diff)
downloadserver-a8c57a878d15ba1e3a6bc10ec2e61251c500a26e.tar.xz
invite right enforced
Diffstat (limited to 'api')
-rw-r--r--api/src/routes/channels/#channel_id/invites.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/api/src/routes/channels/#channel_id/invites.ts b/api/src/routes/channels/#channel_id/invites.ts
index 6d2c625d..208a0705 100644
--- a/api/src/routes/channels/#channel_id/invites.ts
+++ b/api/src/routes/channels/#channel_id/invites.ts
@@ -19,7 +19,8 @@ export interface InviteCreateSchema {
 	target_user_type?: number;
 }
 
-router.post("/", route({ body: "InviteCreateSchema", permission: "CREATE_INSTANT_INVITE" }), async (req: Request, res: Response) => {
+router.post("/", route({ body: "InviteCreateSchema", permission: "CREATE_INSTANT_INVITE", right: "CREATE_INSTANT_INVITE" }),
+			async (req: Request, res: Response) => {
 	const { user_id } = req;
 	const { channel_id } = req.params;
 	const channel = await Channel.findOneOrFail({ where: { id: channel_id }, select: ["id", "name", "type", "guild_id"] });