mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
feat: added filter:tags.getAll plugin hook
This commit is contained in:
@@ -129,7 +129,10 @@ module.exports = function (Topics) {
|
|||||||
|
|
||||||
Topics.getTags = async function (start, stop) {
|
Topics.getTags = async function (start, stop) {
|
||||||
const tags = await db.getSortedSetRevRangeWithScores('tags:topic:count', start, stop);
|
const tags = await db.getSortedSetRevRangeWithScores('tags:topic:count', start, stop);
|
||||||
return await Topics.getTagData(tags);
|
const payload = await plugins.fireHook('filter:tags.getAll', {
|
||||||
|
tags: tags,
|
||||||
|
});
|
||||||
|
return await Topics.getTagData(payload.tags);
|
||||||
};
|
};
|
||||||
|
|
||||||
Topics.getTagData = async function (tags) {
|
Topics.getTagData = async function (tags) {
|
||||||
|
|||||||
Reference in New Issue
Block a user