mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
Add hook "filter:category.build"
Same behavior as "filter:register.build"
This commit is contained in:
@@ -266,7 +266,13 @@ categoriesController.get = function(req, res, next) {
|
||||
res.locals.linkTags.push(rel);
|
||||
});
|
||||
|
||||
res.render('category', data);
|
||||
plugins.fireHook('filter:category.build', {req: req, res: res, templateData: data}, function(err, data) {
|
||||
if (err && process.env === 'development') {
|
||||
winston.warn(JSON.stringify(err));
|
||||
return next(err);
|
||||
}
|
||||
res.render('category', data.templateData);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user