mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
Handle callback errors
This commit is contained in:
@@ -101,6 +101,10 @@ module.exports = function(Posts) {
|
||||
next(null, post);
|
||||
});
|
||||
}, function(err, posts) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
plugins.fireHook('filter:post.getPostSummaryByPids', {posts: posts, uid: uid}, function(err, postData) {
|
||||
callback(err, postData.posts);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user