mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: failing tests @julianlam
This commit is contained in:
@@ -84,14 +84,18 @@ middleware.pageView = function pageView(req, res, next) {
|
|||||||
|
|
||||||
middleware.pluginHooks = async function pluginHooks(req, res, next) {
|
middleware.pluginHooks = async function pluginHooks(req, res, next) {
|
||||||
// TODO: Deprecate in v2.0
|
// TODO: Deprecate in v2.0
|
||||||
await async.each(plugins.loadedHooks['filter:router.page'] || [], function (hookObj, next) {
|
try {
|
||||||
hookObj.method(req, res, next);
|
await async.each(plugins.loadedHooks['filter:router.page'] || [], function (hookObj, next) {
|
||||||
});
|
hookObj.method(req, res, next);
|
||||||
|
});
|
||||||
|
|
||||||
await plugins.fireHook('response:router.page', {
|
await plugins.fireHook('response:router.page', {
|
||||||
req: req,
|
req: req,
|
||||||
res: res,
|
res: res,
|
||||||
});
|
});
|
||||||
|
} catch (err) {
|
||||||
|
return next(err);
|
||||||
|
}
|
||||||
|
|
||||||
if (!res.headersSent) {
|
if (!res.headersSent) {
|
||||||
next();
|
next();
|
||||||
|
|||||||
Reference in New Issue
Block a user