summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSwen <swen.jung@psx-technology.com>2013-01-11 04:43:59 +0100
committerSwen <swen.jung@psx-technology.com>2013-01-11 04:43:59 +0100
commite9726890a4aa4c80bebac2c8e6c3af29522495a5 (patch)
tree0a2c046ffa1850c331a84c22baf607ed7929e8f8
parentc9f137b2e581339b46522bf6ce70ce9b0eb5612d (diff)
downloadetherpad-lite-e9726890a4aa4c80bebac2c8e6c3af29522495a5.zip
Edited getPads function to be able to work without callback
-rw-r--r--src/node/db/PadManager.js6
-rw-r--r--src/package.json2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/node/db/PadManager.js b/src/node/db/PadManager.js
index 32119038..82bc27d0 100644
--- a/src/node/db/PadManager.js
+++ b/src/node/db/PadManager.js
@@ -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
diff --git a/src/package.json b/src/package.json
index 67acd126..826db97b 100644
--- a/src/package.json
+++ b/src/package.json
@@ -46,5 +46,5 @@
"engines" : { "node" : ">=0.6.0",
"npm" : ">=1.0"
},
- "version" : "1.2.3"
+ "version" : "1.2.4"
}