Only fetch published photos on location page
This commit is contained in:
@@ -41,7 +41,8 @@ export const load: PageServerLoad = async ({ params, setHeaders }) => {
|
|||||||
|
|
||||||
photos: photo (
|
photos: photo (
|
||||||
filter: {
|
filter: {
|
||||||
location: { slug: { _eq: "${slug}" }}
|
location: { slug: { _eq: "${slug}" }},
|
||||||
|
status: { _eq: "published" },
|
||||||
},
|
},
|
||||||
sort: "-date_created",
|
sort: "-date_created",
|
||||||
limit: ${PUBLIC_LIST_AMOUNT},
|
limit: ${PUBLIC_LIST_AMOUNT},
|
||||||
@@ -56,7 +57,12 @@ export const load: PageServerLoad = async ({ params, setHeaders }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Shop product
|
# Shop product
|
||||||
product (filter: { location: { slug: { _eq: "${slug}" }}}) {
|
product (
|
||||||
|
filter: {
|
||||||
|
location: { slug: { _eq: "${slug}" }},
|
||||||
|
status: { _eq: "published" },
|
||||||
|
}
|
||||||
|
) {
|
||||||
photos_product {
|
photos_product {
|
||||||
directus_files_id {
|
directus_files_id {
|
||||||
id
|
id
|
||||||
|
|||||||
Reference in New Issue
Block a user