Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #610 from prauscher/fix-api

Fix api
  • Loading branch information...
commit 34786499731935ed64a27d9fcb0b90dc815a381d 2 parents 2435003 + 6da38fd
Peter 'Pita' Martischka Pita authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 src/node/hooks/express/apicalls.js
5 src/node/hooks/express/apicalls.js
@@ -4,7 +4,7 @@ var formidable = require('formidable');
4 4 var apiHandler = require('../../handler/APIHandler');
5 5
6 6 //This is for making an api call, collecting all post information and passing it to the apiHandler
7   -exports.apiCaller = function(req, res, fields) {
  7 +var apiCaller = function(req, res, fields) {
8 8 res.header("Content-Type", "application/json; charset=utf-8");
9 9
10 10 apiLogger.info("REQUEST, " + req.params.func + ", " + JSON.stringify(fields));
@@ -26,6 +26,7 @@ exports.apiCaller = function(req, res, fields) {
26 26 apiHandler.handle(req.params.func, fields, req, res);
27 27 }
28 28
  29 +exports.apiCaller = apiCaller;
29 30
30 31 exports.expressCreateServer = function (hook_name, args, cb) {
31 32 //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) {
55 56 res.end("OK");
56 57 });
57 58 });
58   -}
  59 +}

0 comments on commit 3478649

Please sign in to comment.
Something went wrong with that request. Please try again.