mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 01:56:12 +01:00
refactor: move plugin hook methods to plugin.hooks.*
This commit is contained in:
@@ -184,7 +184,7 @@ Controllers.registerInterstitial = async function (req, res, next) {
|
||||
return res.redirect(nconf.get('relative_path') + '/register');
|
||||
}
|
||||
try {
|
||||
const data = await plugins.fireHook('filter:register.interstitial', {
|
||||
const data = await plugins.hooks.fire('filter:register.interstitial', {
|
||||
userData: req.session.registration,
|
||||
interstitials: [],
|
||||
});
|
||||
@@ -298,7 +298,7 @@ Controllers.manifest = async function (req, res) {
|
||||
});
|
||||
}
|
||||
|
||||
const data = await plugins.fireHook('filter:manifest.build', {
|
||||
const data = await plugins.hooks.fire('filter:manifest.build', {
|
||||
req: req,
|
||||
res: res,
|
||||
manifest: manifest,
|
||||
@@ -331,7 +331,7 @@ Controllers.termsOfUse = async function (req, res, next) {
|
||||
if (!meta.config.termsOfUse) {
|
||||
return next();
|
||||
}
|
||||
const termsOfUse = await plugins.fireHook('filter:parse.post', {
|
||||
const termsOfUse = await plugins.hooks.fire('filter:parse.post', {
|
||||
postData: {
|
||||
content: meta.config.termsOfUse || '',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user