From c041108b479ab8b8abfef504d2790eb84a7dd59d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 26 Apr 2024 12:15:14 -0400 Subject: [PATCH] dont show tags from cid=-1. clicking it doesnt show topics --- src/controllers/tags.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/tags.js b/src/controllers/tags.js index 52ef647625..4b8385b177 100644 --- a/src/controllers/tags.js +++ b/src/controllers/tags.js @@ -91,7 +91,8 @@ tagsController.getTag = async function (req, res) { }; tagsController.getTags = async function (req, res) { - const cids = await categories.getCidsByPrivilege('categories:cid', req.uid, 'topics:read'); + let cids = await categories.getCidsByPrivilege('categories:cid', req.uid, 'topics:read'); + cids = cids.filter(cid => cid !== -1); const [canSearch, tags] = await Promise.all([ privileges.global.can('search:tags', req.uid), topics.getCategoryTagsData(cids, 0, 99),