mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-12 08:55:47 +01:00
fixed #2655
This commit is contained in:
@@ -32,7 +32,7 @@ groupsController.details = function(req, res, next) {
|
|||||||
}, next);
|
}, next);
|
||||||
},
|
},
|
||||||
posts: function(next) {
|
posts: function(next) {
|
||||||
groups.getLatestMemberPosts(req.params.name, 10, uid, next);
|
groups.getLatestMemberPosts(req.params.slug, 10, uid, next);
|
||||||
}
|
}
|
||||||
}, function(err, results) {
|
}, function(err, results) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
@@ -758,11 +758,10 @@ var async = require('async'),
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
Groups.getLatestMemberPosts = function(groupName, max, uid, callback) {
|
Groups.getLatestMemberPosts = function(groupSlug, max, uid, callback) {
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function(next) {
|
async.apply(Groups.getGroupNameByGroupSlug, groupSlug),
|
||||||
Groups.getMembers(groupName, next);
|
Groups.getMembers,
|
||||||
},
|
|
||||||
function(uids, next) {
|
function(uids, next) {
|
||||||
if (!Array.isArray(uids) || !uids.length) {
|
if (!Array.isArray(uids) || !uids.length) {
|
||||||
return callback(null, []);
|
return callback(null, []);
|
||||||
|
|||||||
Reference in New Issue
Block a user