Skip to content

Commit

Permalink
dont show tags from cid=-1. clicking it doesnt show topics
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Apr 26, 2024
1 parent fd35dd1 commit c041108
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/controllers/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit c041108

Please sign in to comment.