summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Rauscher <prauscher@ohai.su>2012-04-07 15:25:37 +0200
committerPatrick Rauscher <prauscher@ohai.su>2012-04-07 13:40:02 +0000
commit6da38fd8bccc9ed90b7d654751cc052be5664550 (patch)
tree2c99dfa3b49f39361e5ae5bd43f8f5837630935a
parent24350034034859c7976afb1da5d100f1da50a846 (diff)
downloadetherpad-lite-6da38fd8bccc9ed90b7d654751cc052be5664550.zip
bugfix to use the API again
-rw-r--r--src/node/hooks/express/apicalls.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/node/hooks/express/apicalls.js b/src/node/hooks/express/apicalls.js
index 8a9751eb..2f9e4edf 100644
--- a/src/node/hooks/express/apicalls.js
+++ b/src/node/hooks/express/apicalls.js
@@ -4,7 +4,7 @@ var formidable = require('formidable');
var apiHandler = require('../../handler/APIHandler');
//This is for making an api call, collecting all post information and passing it to the apiHandler
-exports.apiCaller = function(req, res, fields) {
+var apiCaller = function(req, res, fields) {
res.header("Content-Type", "application/json; charset=utf-8");
apiLogger.info("REQUEST, " + req.params.func + ", " + JSON.stringify(fields));
@@ -26,6 +26,7 @@ exports.apiCaller = function(req, res, fields) {
apiHandler.handle(req.params.func, fields, req, res);
}
+exports.apiCaller = apiCaller;
exports.expressCreateServer = function (hook_name, args, cb) {
//This is a api GET call, collect all post informations and pass it to the apiHandler
@@ -55,4 +56,4 @@ exports.expressCreateServer = function (hook_name, args, cb) {
res.end("OK");
});
});
-} \ No newline at end of file
+}