mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-16 02:36:16 +01:00
Topic await errors (#7727)
* feat: derp await * feat: restore user.getSettings * feat: cleanup * feat: make tid const * feat: cleanup * fix: tests * feat: deprecate filter:controllers.topic.get * feat: rewrite post-index logic * feat: change calculation to match others * fix: use .async * feat: remove try/catch wrapper
This commit is contained in:
committed by
GitHub
parent
5e46cf9b09
commit
bd640a1107
@@ -60,10 +60,7 @@ module.exports = function (Posts) {
|
||||
Posts.getPostIndices(postData, uid, next);
|
||||
},
|
||||
topics: function (next) {
|
||||
var tids = postData.map(function (post) {
|
||||
return post ? post.tid : null;
|
||||
});
|
||||
|
||||
const tids = postData.map(post => post && post.tid);
|
||||
topics.getTopicsFields(tids, ['slug'], next);
|
||||
},
|
||||
}, next);
|
||||
|
||||
Reference in New Issue
Block a user