fix: tests

v1.18.x
Barış Soner Uşaklı 5 years ago
parent bbc7737e14
commit 9df871bee2

@ -24,7 +24,7 @@ module.exports = function (Groups) {
};
Groups.isMember = async function (uid, groupName) {
if (!uid || !(parseInt(uid, 10) > 0) || !groupName) {
if (!uid || parseInt(uid, 10) <= 0 || !groupName) {
return false;
}
@ -65,7 +65,7 @@ module.exports = function (Groups) {
};
Groups.isMemberOfGroups = async function (uid, groups) {
if (!uid || !(parseInt(uid, 10) > 0) || !groups.length) {
if (!uid || parseInt(uid, 10) <= 0 || !groups.length) {
return groups.map(groupName => groupName === 'guests');
}
const cachedData = {};

Loading…
Cancel
Save