mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-03-20 10:51:42 +01:00
feat(maker): admin oper can create maker group for user now, in user manager page
This commit is contained in:
@@ -19,14 +19,17 @@ exports.userByID = function (req, res, next, id) {
|
||||
|
||||
User.findOne({
|
||||
_id: id
|
||||
}).populate('invited_by', 'username displayName profileImageURL').exec(function (err, user) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
} else if (!user) {
|
||||
return next(new Error('Failed to load User ' + id));
|
||||
}
|
||||
})
|
||||
.populate('invited_by', 'username displayName profileImageURL')
|
||||
.populate('makers', 'name')
|
||||
.exec(function (err, user) {
|
||||
if (err) {
|
||||
return next(err);
|
||||
} else if (!user) {
|
||||
return next(new Error('Failed to load User ' + id));
|
||||
}
|
||||
|
||||
req.profile = user;
|
||||
next();
|
||||
});
|
||||
req.profile = user;
|
||||
next();
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user