mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-30 02:25:55 +01:00
Fix space-before-function-paren linter rule
This commit is contained in:
@@ -12,17 +12,17 @@ var async = require('async'),
|
||||
var groupsController = {};
|
||||
|
||||
|
||||
groupsController.list = function(req, res, next) {
|
||||
groupsController.list = function (req, res, next) {
|
||||
var page = parseInt(req.query.page, 10) || 1;
|
||||
var groupsPerPage = 20;
|
||||
var pageCount = 0;
|
||||
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
function (next) {
|
||||
db.getSortedSetRevRange('groups:createtime', 0, -1, next);
|
||||
},
|
||||
function(groupNames, next) {
|
||||
groupNames = groupNames.filter(function(name) {
|
||||
function (groupNames, next) {
|
||||
groupNames = groupNames.filter(function (name) {
|
||||
return name.indexOf(':privileges:') === -1 && name !== 'registered-users';
|
||||
});
|
||||
pageCount = Math.ceil(groupNames.length / groupsPerPage);
|
||||
@@ -33,10 +33,10 @@ groupsController.list = function(req, res, next) {
|
||||
groupNames = groupNames.slice(start, stop + 1);
|
||||
groups.getGroupsData(groupNames, next);
|
||||
},
|
||||
function(groupData, next) {
|
||||
function (groupData, next) {
|
||||
next(null, {groups: groupData, pagination: pagination.create(page, pageCount)});
|
||||
}
|
||||
], function(err, data) {
|
||||
], function (err, data) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
}
|
||||
@@ -49,19 +49,19 @@ groupsController.list = function(req, res, next) {
|
||||
});
|
||||
};
|
||||
|
||||
groupsController.get = function(req, res, callback) {
|
||||
groupsController.get = function (req, res, callback) {
|
||||
var groupName = req.params.name;
|
||||
async.waterfall([
|
||||
function(next){
|
||||
function (next){
|
||||
groups.exists(groupName, next);
|
||||
},
|
||||
function(exists, next) {
|
||||
function (exists, next) {
|
||||
if (!exists) {
|
||||
return callback();
|
||||
}
|
||||
groups.get(groupName, {uid: req.uid, truncateUserList: true, userListCount: 20}, next);
|
||||
}
|
||||
], function(err, group) {
|
||||
], function (err, group) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user