Merge pull request #422 from jhollinger/fix_listPads
HTTP API listPads should return an array
This commit is contained in:
commit
ebeb2da275
|
@ -249,9 +249,13 @@ exports.listPads = function(groupID, callback)
|
||||||
//group exists, let's get the pads
|
//group exists, let's get the pads
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
db.getSub("group:" + groupID, ["pads"], function(err, pads)
|
db.getSub("group:" + groupID, ["pads"], function(err, result)
|
||||||
{
|
{
|
||||||
if(ERR(err, callback)) return;
|
if(ERR(err, callback)) return;
|
||||||
|
var pads = [];
|
||||||
|
for ( var padId in result ) {
|
||||||
|
pads.push(padId);
|
||||||
|
}
|
||||||
callback(null, {padIDs: pads});
|
callback(null, {padIDs: pads});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue