mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 01:26:16 +01:00
Fix space-before-function-paren linter rule
This commit is contained in:
@@ -10,12 +10,12 @@ var plugins = require('../../plugins');
|
||||
var dashboardController = {};
|
||||
|
||||
|
||||
dashboardController.get = function(req, res, next) {
|
||||
dashboardController.get = function (req, res, next) {
|
||||
async.parallel({
|
||||
stats: function(next) {
|
||||
stats: function (next) {
|
||||
getStats(next);
|
||||
},
|
||||
notices: function(next) {
|
||||
notices: function (next) {
|
||||
var notices = [
|
||||
{
|
||||
done: !meta.reloadRequired,
|
||||
@@ -32,7 +32,7 @@ dashboardController.get = function(req, res, next) {
|
||||
];
|
||||
plugins.fireHook('filter:admin.notices', notices, next);
|
||||
}
|
||||
}, function(err, results) {
|
||||
}, function (err, results) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
@@ -46,19 +46,19 @@ dashboardController.get = function(req, res, next) {
|
||||
|
||||
function getStats(callback) {
|
||||
async.parallel([
|
||||
function(next) {
|
||||
function (next) {
|
||||
getStatsForSet('ip:recent', 'uniqueIPCount', next);
|
||||
},
|
||||
function(next) {
|
||||
function (next) {
|
||||
getStatsForSet('users:joindate', 'userCount', next);
|
||||
},
|
||||
function(next) {
|
||||
function (next) {
|
||||
getStatsForSet('posts:pid', 'postCount', next);
|
||||
},
|
||||
function(next) {
|
||||
function (next) {
|
||||
getStatsForSet('topics:tid', 'topicCount', next);
|
||||
}
|
||||
], function(err, results) {
|
||||
], function (err, results) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
@@ -80,23 +80,23 @@ function getStatsForSet(set, field, callback) {
|
||||
|
||||
var now = Date.now();
|
||||
async.parallel({
|
||||
day: function(next) {
|
||||
day: function (next) {
|
||||
db.sortedSetCount(set, now - terms.day, '+inf', next);
|
||||
},
|
||||
week: function(next) {
|
||||
week: function (next) {
|
||||
db.sortedSetCount(set, now - terms.week, '+inf', next);
|
||||
},
|
||||
month: function(next) {
|
||||
month: function (next) {
|
||||
db.sortedSetCount(set, now - terms.month, '+inf', next);
|
||||
},
|
||||
alltime: function(next) {
|
||||
alltime: function (next) {
|
||||
getGlobalField(field, next);
|
||||
}
|
||||
}, callback);
|
||||
}
|
||||
|
||||
function getGlobalField(field, callback) {
|
||||
db.getObjectField('global', field, function(err, count) {
|
||||
db.getObjectField('global', field, function (err, count) {
|
||||
callback(err, parseInt(count, 10) || 0);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user