added listAllPads API command, renamed listPads(GroupID) for Group Pads to listGroupPads(GroupID)

This commit is contained in:
Marek Jawurek 2011-09-17 17:58:00 +02:00
parent ecd486e440
commit 8fbc96dd7a
4 changed files with 54 additions and 3 deletions

View file

@ -113,3 +113,18 @@ exports.unloadPad = function(padId)
if(globalPads[padId])
delete globalPads[padId];
}
exports.listAllPads = function(callback)
{
db.get("allpads",function(err,data)
{
if(err) callback(err);
if(data){
callback(err,data);
}
else callback(err,[]);
});
}