mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-28 09:36:16 +01:00
optimized home
This commit is contained in:
@@ -69,17 +69,7 @@ Controllers.home = function(req, res, next) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
function getRecentReplies(category, callback) {
|
||||
categories.getRecentTopicReplies(category.cid, uid, parseInt(category.numRecentReplies, 10), function (err, posts) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
category.posts = posts;
|
||||
callback();
|
||||
});
|
||||
}
|
||||
|
||||
async.each(categoryData, getRecentReplies, function (err) {
|
||||
categories.getRecentTopicReplies(categoryData, function(err) {
|
||||
next(err, categoryData);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user