mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 10:46:14 +01:00
fix dependency errors
This commit is contained in:
@@ -9,7 +9,7 @@ var _ = require('underscore');
|
||||
var db = require('../database');
|
||||
var posts = require('../posts');
|
||||
var topics = require('../topics');
|
||||
var categories = require('../categories');
|
||||
var privileges = require('../privileges');
|
||||
|
||||
|
||||
module.exports = function(Categories) {
|
||||
@@ -18,7 +18,7 @@ module.exports = function(Categories) {
|
||||
if (!parseInt(count, 10)) {
|
||||
return callback(null, []);
|
||||
}
|
||||
var privileges = require('../privileges');
|
||||
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
db.getSortedSetRevRange('cid:' + cid + ':pids', 0, count - 1, next);
|
||||
@@ -36,7 +36,7 @@ module.exports = function(Categories) {
|
||||
if (!Array.isArray(categoryData) || !categoryData.length) {
|
||||
return callback();
|
||||
}
|
||||
var privileges = require('../privileges');
|
||||
|
||||
async.waterfall([
|
||||
function(next) {
|
||||
async.map(categoryData, getRecentTopicTids, next);
|
||||
@@ -121,7 +121,7 @@ module.exports = function(Categories) {
|
||||
});
|
||||
|
||||
async.parallel({
|
||||
categoryData: async.apply(categories.getCategoriesFields, cids, ['cid', 'parentCid']),
|
||||
categoryData: async.apply(Categories.getCategoriesFields, cids, ['cid', 'parentCid']),
|
||||
teasers: async.apply(topics.getTeasers, _topicData),
|
||||
}, next);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user