From 00ffe975d97badde1f389de67a67df8cbd1b66bb Mon Sep 17 00:00:00 2001 From: Kevin Lewis Date: Wed, 6 Mar 2024 09:22:26 +0100 Subject: [PATCH] Explicitly require published status to show in listing (#139) --- pages/tv/live/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/tv/live/index.vue b/pages/tv/live/index.vue index d15d9080..b15828a0 100644 --- a/pages/tv/live/index.vue +++ b/pages/tv/live/index.vue @@ -25,7 +25,11 @@ const directusUrl = process.env.DIRECTUS_TV_URL || tvUrl; const directus = createDirectus(directusUrl).with(rest()); const globals = await directus.request(readSingleton('globals')); -let events = await directus.request(readItems('events', { sort: ['date_start'] })); + +let events = await directus.request( + readItems('events', { sort: ['date_start'], filter: { status: { _eq: 'published' } } }), +); + events = events.map((event) => ({ ...event, published: event.date_start })); definePageMeta({