Fixed internal tags showing up in the search results

refs https://github.com/TryGhost/Team/issues/1665

- By default we don't want to show internal tags in search results
This commit is contained in:
Naz 2022-07-08 09:34:04 +02:00
parent 233a1c2e4c
commit 13d4749949
2 changed files with 4 additions and 3 deletions

View File

@ -87,7 +87,8 @@ export default class SearchIndex {
let tags = await this.api.tags.browse({
limit: '10000',
fields: 'id,slug,name,url',
order: 'updated_at DESC'
order: 'updated_at DESC',
filter: 'visibility:public'
});
if (tags || tags.length > 0) {

View File

@ -16,7 +16,7 @@ describe('search index', function () {
.reply(200, {
authors: []
})
.get('/tags/?key=69010382388f9de5869ad6e558&&limit=10000&fields=id,slug,name,url&order=updated_at%20DESC')
.get('/tags/?key=69010382388f9de5869ad6e558&&limit=10000&fields=id,slug,name,url&order=updated_at%20DESC&filter=visibility%3Apublic')
.reply(200, {
tags: []
});
@ -63,7 +63,7 @@ describe('search index', function () {
url: 'http://localhost/ghost/authors/bob/'
}]
})
.get('/tags/?key=69010382388f9de5869ad6e558&&limit=10000&fields=id,slug,name,url&order=updated_at%20DESC')
.get('/tags/?key=69010382388f9de5869ad6e558&&limit=10000&fields=id,slug,name,url&order=updated_at%20DESC&filter=visibility%3Apublic')
.reply(200, {
tags: [{
id: 'uniq_tag',