refactor: move plugin hook methods to plugin.hooks.*

This commit is contained in:
Julian Lam
2020-11-20 16:06:26 -05:00
parent 3b1c03ed50
commit 6e2da9966e
136 changed files with 550 additions and 541 deletions

View File

@@ -144,7 +144,7 @@ module.exports = function (Posts) {
current = 'unvote';
}
plugins.fireHook('action:post.' + hook, {
plugins.hooks.fire('action:post.' + hook, {
pid: pid,
uid: uid,
owner: owner,
@@ -251,7 +251,7 @@ module.exports = function (Posts) {
downvotes: postData.downvotes,
}),
]);
plugins.fireHook('action:post.updatePostVoteCount', { post: postData });
plugins.hooks.fire('action:post.updatePostVoteCount', { post: postData });
};
async function updateTopicVoteCount(postData) {