From 596c60e010a8372c729306476c0734e86f990ad9 Mon Sep 17 00:00:00 2001 From: binsky Date: Sat, 9 Apr 2022 04:11:10 +0200 Subject: fix invite right enforcement --- api/src/routes/channels/#channel_id/invites.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'api') diff --git a/api/src/routes/channels/#channel_id/invites.ts b/api/src/routes/channels/#channel_id/invites.ts index 6367a8b6..9c361164 100644 --- a/api/src/routes/channels/#channel_id/invites.ts +++ b/api/src/routes/channels/#channel_id/invites.ts @@ -19,7 +19,7 @@ export interface InviteCreateSchema { target_user_type?: number; } -router.post("/", route({ body: "InviteCreateSchema", permission: "CREATE_INVITES", right: "CREATE_INSTANT_INVITE" }), +router.post("/", route({ body: "InviteCreateSchema", permission: "CREATE_INSTANT_INVITE", right: "CREATE_INVITES" }), async (req: Request, res: Response) => { const { user_id } = req; const { channel_id } = req.params; -- cgit 1.4.1