mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-22 05:19:22 +00:00
Fix bad check in invation route
This commit is contained in:
parent
59925dab45
commit
45e9ca43fe
@ -300,7 +300,7 @@ export class GroupsController {
|
||||
const groupID = await h.postGroupIDWithAccess("group_id", GroupsAccessLevel.MODERATOR_ACCESS);
|
||||
const userID = await h.postUserId("userID");
|
||||
|
||||
if(!await GroupsHelper.GetMembershipLevel(groupID, userID))
|
||||
if(await GroupsHelper.GetMembershipLevel(groupID, userID) != GroupMembershipLevels.VISITOR)
|
||||
h.error(401, "The user is not a visitor of the group!");
|
||||
|
||||
await GroupsHelper.SendInvitation(groupID, userID);
|
||||
|
Loading…
Reference in New Issue
Block a user