mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-08-05 20:40:20 +02:00
* feat: add upgrade script to give mods privs * feat: give all privileges when making a moderator * feat: remove implicit privs * feat: give global mods default privs * feat: more priv fixes * feat: use lodash * fix: remove implicit mod priv from topic delete * fix: more privs * fix: posts.canEdit * fix: canDelete and canEdit * fix: tests, remove console.log * feat: shorter functions * feat: add tests * fix: uids * fix: redis random test fail
This commit is contained in:
committed by
GitHub
parent
ebb32e7891
commit
035f624758
@@ -28,9 +28,7 @@ module.exports = function (Posts) {
|
||||
},
|
||||
function (_postData, next) {
|
||||
postData = _postData;
|
||||
tids = _.uniq(postData.map(function (post) {
|
||||
return post && post.tid;
|
||||
}).filter(Boolean));
|
||||
tids = _.uniq(postData.map(post => post && post.tid).filter(Boolean));
|
||||
|
||||
topics.getTopicsFields(tids, ['cid'], next);
|
||||
},
|
||||
@@ -42,9 +40,7 @@ module.exports = function (Posts) {
|
||||
}
|
||||
});
|
||||
|
||||
var cids = postData.map(function (post) {
|
||||
return map[post.tid];
|
||||
});
|
||||
var cids = postData.map(post => map[post.tid]);
|
||||
next(null, cids);
|
||||
},
|
||||
], callback);
|
||||
|
||||
Reference in New Issue
Block a user