Browse files

Merge pull request #610 from prauscher/fix-api

Fix api
  • Loading branch information...
2 parents 2435003 + 6da38fd commit 34786499731935ed64a27d9fcb0b90dc815a381d @Pita Pita committed Apr 7, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/node/hooks/express/apicalls.js
View
5 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");
});
});
-}
+}

0 comments on commit 3478649

Please sign in to comment.