From a9799c0f4e04e4a3583724a5b8301b831c7ce4e9 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 5 Dec 2014 18:20:45 -0300 Subject: [PATCH 1/2] rm call to next --- app/controllers/index.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/controllers/index.js b/app/controllers/index.js index 1b084232..24dfedfb 100644 --- a/app/controllers/index.js +++ b/app/controllers/index.js @@ -10,13 +10,12 @@ var _getVersion = function() { exports.render = function(req, res, next) { if (config.publicPath) { - return res.sendfile(config.publicPath + '/index.html', {}, function(err) { - return next(); - }); + return res.sendfile(config.publicPath + '/index.html'); + } + else { + var version = _getVersion(); + res.send('insight API v' + version); } - - var version = _getVersion(); - res.send('insight API v' + version); }; exports.version = function(req, res) { From 5f7ce0f853ae7d51f2fd32631895d056968026d3 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Fri, 5 Dec 2014 18:26:17 -0300 Subject: [PATCH 2/2] fix signature --- app/controllers/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/index.js b/app/controllers/index.js index 24dfedfb..1d2d435b 100644 --- a/app/controllers/index.js +++ b/app/controllers/index.js @@ -7,7 +7,7 @@ var _getVersion = function() { return pjson.version; }; -exports.render = function(req, res, next) { +exports.render = function(req, res) { if (config.publicPath) { return res.sendfile(config.publicPath + '/index.html');