Files
NodeBB/src/controllers/admin/database.js
Barış Soner Uşaklı 0f234601f1 style changes
2017-06-22 19:03:49 -04:00

35 lines
711 B
JavaScript

'use strict';
var async = require('async');
var nconf = require('nconf');
var databaseController = module.exports;
databaseController.get = function (req, res, next) {
async.waterfall([
function (next) {
async.parallel({
redis: function (next) {
if (nconf.get('redis')) {
var rdb = require('../../database/redis');
rdb.info(rdb.client, next);
} else {
next();
}
},
mongo: function (next) {
if (nconf.get('mongo')) {
var mdb = require('../../database/mongo');
mdb.info(mdb.client, next);
} else {
next();
}
},
}, next);
},
function (results) {
res.render('admin/advanced/database', results);
},
], next);
};