HTTP API listPads should return an array

pull/422/head
Jordan 2012-02-06 21:10:37 -05:00
parent e74c9e1bc9
commit 5fde0b548c
1 changed files with 5 additions and 1 deletions

View File

@ -248,9 +248,13 @@ exports.listPads = function(groupID, callback)
//group exists, let's get the pads
else
{
db.getSub("group:" + groupID, ["pads"], function(err, pads)
db.getSub("group:" + groupID, ["pads"], function(err, result)
{
if(ERR(err, callback)) return;
var pads = [];
for ( var padId in result ) {
pads.push(padId);
}
callback(null, {padIDs: pads});
});
}