mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 18:46:01 +01:00
Home route (#7039)
* fix: WIP home fix * remove console.log * fix: #6949 on redis run all tests in subfolder /forum fix URI errors fix sping/ping
This commit is contained in:
committed by
GitHub
parent
cd46febdd0
commit
1f918ca8f8
@@ -1,7 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
var async = require('async');
|
||||
var db = require('../database');
|
||||
const async = require('async');
|
||||
const nconf = require('nconf');
|
||||
const db = require('../database');
|
||||
|
||||
module.exports.ping = function (req, res, next) {
|
||||
async.waterfall([
|
||||
@@ -9,7 +10,7 @@ module.exports.ping = function (req, res, next) {
|
||||
db.getObject('config', next);
|
||||
},
|
||||
function () {
|
||||
res.status(200).send(req.path === '/sping' ? 'healthy' : '200');
|
||||
res.status(200).send(req.path === nconf.get('relative_path') + '/sping' ? 'healthy' : '200');
|
||||
},
|
||||
], next);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user