mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
refactor: move plugin hook methods to plugin.hooks.*
This commit is contained in:
@@ -116,7 +116,7 @@ helpers.buildTerms = function (url, term, query) {
|
||||
};
|
||||
|
||||
helpers.notAllowed = async function (req, res, error) {
|
||||
const data = await plugins.fireHook('filter:helpers.notAllowed', {
|
||||
const data = await plugins.hooks.fire('filter:helpers.notAllowed', {
|
||||
req: req,
|
||||
res: res,
|
||||
error: error,
|
||||
@@ -336,7 +336,7 @@ helpers.getHomePageRoutes = async function (uid) {
|
||||
name: 'Custom',
|
||||
},
|
||||
]);
|
||||
const data = await plugins.fireHook('filter:homepage.get', { routes: routes });
|
||||
const data = await plugins.hooks.fire('filter:homepage.get', { routes: routes });
|
||||
return data.routes;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user