change listGroups output

This commit is contained in:
aritas1 2012-02-14 21:57:08 +04:00
parent 7869e4b69b
commit 8bff85cdb2
2 changed files with 3 additions and 3 deletions

View file

@ -480,7 +480,7 @@ exports.listAllPads = function(callback)
//get all groups //get all groups
groupManager.listGroups(function (err, groups) groupManager.listGroups(function (err, groups)
{ {
groups=groups["groups"]; groups=groups["groupIDs"];
// if defaultGroup exists add this too, becaus ists not listed in groupManager.listGroups // if defaultGroup exists add this too, becaus ists not listed in groupManager.listGroups
groupManager.doesGroupExist(defaultGroup, function(err, exists) groupManager.doesGroupExist(defaultGroup, function(err, exists)
{ {

View file

@ -143,9 +143,9 @@ exports.listGroups = function(callback)
//try to get the groups entry //try to get the groups entry
db.get("groups", function (err, groups) db.get("groups", function (err, groups)
{ {
if(groups == null) groups = []; if(groups == null) groups["groups"] = [];
if(ERR(err, callback)) return; if(ERR(err, callback)) return;
callback(null, groups); callback(null, {groupIDs: groups["groups"]});
}); });
} }