fix: tests

This commit is contained in:
Barış Soner Uşaklı
2020-07-29 12:53:36 -04:00
parent bbc7737e14
commit 9df871bee2

View File

@@ -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 = {};