make the tests work
This commit is contained in:
@@ -7,8 +7,8 @@ exports = module.exports = {
|
||||
getByName,
|
||||
update,
|
||||
getWithMembers,
|
||||
getAll,
|
||||
getAllWithMembers,
|
||||
list,
|
||||
listWithMembers,
|
||||
|
||||
getMembers,
|
||||
addMember,
|
||||
@@ -121,12 +121,12 @@ async function getWithMembers(id) {
|
||||
return result;
|
||||
}
|
||||
|
||||
async function getAll() {
|
||||
async function list() {
|
||||
const results = await database.query('SELECT ' + GROUPS_FIELDS + ' FROM userGroups ORDER BY name');
|
||||
return results;
|
||||
}
|
||||
|
||||
async function getAllWithMembers() {
|
||||
async function listWithMembers() {
|
||||
const results = await database.query('SELECT ' + GROUPS_FIELDS + ',GROUP_CONCAT(groupMembers.userId) AS userIds ' +
|
||||
' FROM userGroups LEFT OUTER JOIN groupMembers ON userGroups.id = groupMembers.groupId ' +
|
||||
' GROUP BY userGroups.id ORDER BY name');
|
||||
|
||||
Reference in New Issue
Block a user