Edited getPads function to be able to work without callback
parent
c9f137b2e5
commit
e9726890a4
|
@ -150,7 +150,11 @@ exports.getPad = function(id, text, callback)
|
|||
|
||||
exports.getPads = function(callback)
|
||||
{
|
||||
callback(null,padList.getPads());
|
||||
if(callback != null){
|
||||
callback(null,padList.getPads());
|
||||
}else{
|
||||
return padList.getPads();
|
||||
}
|
||||
}
|
||||
|
||||
//checks if a pad exists
|
||||
|
|
|
@ -46,5 +46,5 @@
|
|||
"engines" : { "node" : ">=0.6.0",
|
||||
"npm" : ">=1.0"
|
||||
},
|
||||
"version" : "1.2.3"
|
||||
"version" : "1.2.4"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue