diff --git a/app/controllers/index.js b/app/controllers/index.js index 1b08423..24dfedf 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) {