Map group roles to scopes

This commit is contained in:
Girish Ramakrishnan
2018-06-18 14:21:54 -07:00
parent b5c8e7a52a
commit 6cd0601629
5 changed files with 50 additions and 4 deletions
-1
View File
@@ -291,7 +291,6 @@ function getGroups(userId, callback) {
database.query('SELECT ' + GROUPS_FIELDS + ' ' +
' FROM groups INNER JOIN groupMembers ON groups.id = groupMembers.groupId AND groupMembers.userId = ?', [ userId ], function (error, results) {
if (error) return callback(new DatabaseError(DatabaseError.INTERNAL_ERROR, error));
if (results.length === 0) return callback(new DatabaseError(DatabaseError.NOT_FOUND));
results.forEach(postProcess);