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 (
|
||||
filter: {
|
||||
location: { slug: { _eq: "${slug}" }}
|
||||
location: { slug: { _eq: "${slug}" }},
|
||||
status: { _eq: "published" },
|
||||
},
|
||||
sort: "-date_created",
|
||||
limit: ${PUBLIC_LIST_AMOUNT},
|
||||
@@ -56,7 +57,12 @@ export const load: PageServerLoad = async ({ params, setHeaders }) => {
|
||||
}
|
||||
|
||||
# Shop product
|
||||
product (filter: { location: { slug: { _eq: "${slug}" }}}) {
|
||||
product (
|
||||
filter: {
|
||||
location: { slug: { _eq: "${slug}" }},
|
||||
status: { _eq: "published" },
|
||||
}
|
||||
) {
|
||||
photos_product {
|
||||
directus_files_id {
|
||||
id
|
||||
|
||||
Reference in New Issue
Block a user