Only fetch published photos and locations
All checks were successful
continuous-integration/drone/push Build is passing

- Globally for photos
- For sitemap locations and photos
This commit is contained in:
2020-04-22 12:01:52 +02:00
parent 8231ea20a7
commit 3c364814df
4 changed files with 5 additions and 5 deletions

View File

@@ -12,7 +12,7 @@
].join(',')
const sort = ['-created_on', 'name'].join(',')
const limit = -1
const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=${fields}&filter[location.slug][rlike]=%${page.params.place}%&limit=${limit}&sort=${sort}`, {
const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=${fields}&status=published&filter[location.slug][rlike]=%${page.params.place}%&limit=${limit}&sort=${sort}`, {
'Authorization': 'bearer ' + process.env.CONFIG.API_TOKEN
})
const photos = await req.json()