summaryrefslogtreecommitdiff
path: root/src/node/db
diff options
context:
space:
mode:
authorJordan Hollinger <jordan.hollinger@gmail.com>2013-01-18 11:13:03 -0500
committerJordan Hollinger <jordan.hollinger@gmail.com>2013-01-18 11:13:03 -0500
commit858d8e6e7103712656c79e72a22daba4cbd505b3 (patch)
treeb43049ebd6f3957d1549b873573ccb04f27932dd /src/node/db
parent96989e63c74e05ea0665ed38d6ef6ea08720a6e7 (diff)
downloadetherpad-lite-858d8e6e7103712656c79e72a22daba4cbd505b3.zip
listAllPads should return an object, not an arraay. issue #1374
Diffstat (limited to 'src/node/db')
-rw-r--r--src/node/db/API.js2
-rw-r--r--src/node/db/PadManager.js6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/node/db/API.js b/src/node/db/API.js
index ee12d1d9..9cad415d 100644
--- a/src/node/db/API.js
+++ b/src/node/db/API.js
@@ -46,7 +46,7 @@ exports.createGroupPad = groupManager.createGroupPad;
/**PADLIST FUNCTION****/
/**********************/
-exports.listAllPads = padManager.getPads;
+exports.listAllPads = padManager.listAllPads;
/**********************/
/**AUTHOR FUNCTIONS****/
diff --git a/src/node/db/PadManager.js b/src/node/db/PadManager.js
index 8cd69a83..5e0af464 100644
--- a/src/node/db/PadManager.js
+++ b/src/node/db/PadManager.js
@@ -158,12 +158,12 @@ exports.getPad = function(id, text, callback)
}
}
-exports.getPads = function(callback)
+exports.listAllPads = function(callback)
{
if(callback != null){
- callback(null,padList.getPads());
+ callback(null,{padIDs: padList.getPads()});
}else{
- return padList.getPads();
+ return {padIDs: padList.getPads()};
}
}