mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 11:11:04 +01:00
test: fix group tests
no idea how these passed on gh runner
This commit is contained in:
@@ -155,13 +155,14 @@ groupsAPI.leave = async function (caller, data) {
|
||||
groups.isMember(data.uid, groupName),
|
||||
]);
|
||||
|
||||
if (!userExists) {
|
||||
throw new Error('[[error:invalid-uid]]');
|
||||
}
|
||||
if (!isMember) {
|
||||
throw new Error('[[error:group-not-member]]');
|
||||
}
|
||||
|
||||
if (!userExists) {
|
||||
throw new Error('[[error:invalid-uid]]');
|
||||
}
|
||||
|
||||
if (groupData.disableLeave && isSelf) {
|
||||
throw new Error('[[error:group-leave-disabled]]');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user