Tweaks and fixes

This commit is contained in:
2020-02-17 22:36:36 +01:00
parent 6fb6937c1a
commit 0174ba08f2
8 changed files with 20 additions and 70 deletions

View File

@@ -6,7 +6,7 @@
// Preload data
export async function preload (page, session) {
// Load photos
const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=id,name,date,slug,image.*,created_on,modified_on&filter[location.slug][rlike]=%${page.params.location}%&limit=-1&sort=-created_on,name`)
const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=id,name,date,slug,image.*,location.*,location.country.*,created_on,modified_on&filter[location.slug][rlike]=%${page.params.location}%&limit=-1&sort=-created_on,name`)
const photos = await req.json()
if (req.status === 200) {
return { photos: photos.data }