From 4b2610a2b50d4da0ed97a124243fbcee5167a005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Tue, 3 Mar 2020 17:41:24 +0100 Subject: [PATCH] Fix photo date --- src/routes/location/[country]/[location].svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/routes/location/[country]/[location].svelte b/src/routes/location/[country]/[location].svelte index b6e10ab..0d8b4d9 100644 --- a/src/routes/location/[country]/[location].svelte +++ b/src/routes/location/[country]/[location].svelte @@ -11,8 +11,7 @@ // Preload data export async function preload (page, session) { // Load photos - const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=id,name,slug,image.*,location.*,location.country.*,created_on,modified_on&filter[location.slug][rlike]=%${page.params.location}%&limit=-1&sort=-created_on,name`) - console.log(req.headers.host) + const req = await this.fetch(`${apiEndpoints.rest}/items/photos?fields=id,name,slug,date,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.ok) { return { photos: photos.data }