Fix space-before-function-paren linter rule

This commit is contained in:
HeeL
2016-10-13 11:43:39 +02:00
parent 3fa1c1f927
commit 4a3c31b2dc
385 changed files with 6621 additions and 6622 deletions

View File

@@ -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);
});
}