|
|
@ -239,6 +239,10 @@ var meta = require('./meta');
|
|
|
|
db.getSortedSetRange('categories:cid', 0, -1, function (err, cids) {
|
|
|
|
db.getSortedSetRange('categories:cid', 0, -1, function (err, cids) {
|
|
|
|
async.filter(cids, function (cid, next) {
|
|
|
|
async.filter(cids, function (cid, next) {
|
|
|
|
User.isModerator(uid, cid, function (err, isMod) {
|
|
|
|
User.isModerator(uid, cid, function (err, isMod) {
|
|
|
|
|
|
|
|
if (err) {
|
|
|
|
|
|
|
|
// do nothing because async doesn't support errors in filter yet
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
next(!!isMod);
|
|
|
|
next(!!isMod);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, function (result) {
|
|
|
|
}, function (result) {
|
|
|
|