From ecc6a55aba7bb35fc778e7a53848396b88214151 Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Sat, 23 Aug 2025 22:29:28 +0100 Subject: Add multiple conferences feature --- web/components/EventListing.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'web/components/EventListing.vue') diff --git a/web/components/EventListing.vue b/web/components/EventListing.vue index 5c04189..0cc546c 100644 --- a/web/components/EventListing.vue +++ b/web/components/EventListing.vue @@ -10,6 +10,7 @@ const { event, showRelativeTime } = defineProps<{ }>(); const selectedEventStore = useSelectedEventStore(); +const conferenceStore = useConferenceStore(); const favouritesStore = useFavouritesStore(); const errorStore = useErrorStore(); const config = useRuntimeConfig(); @@ -43,9 +44,10 @@ const addFavourite = async () => { addingToFavourite.value = true; try { - const res = await $fetch(config.public.baseURL + '/favourites', { + const res = await $api(config.public.baseURL + '/favourites', { method: 'POST', body: JSON.stringify({ + conferenceId: conferenceStore.id, eventGuid: event.guid, eventId: event.id, }), @@ -70,7 +72,7 @@ const removeFavourite = async () => { addingToFavourite.value = true; try { - await $fetch(config.public.baseURL + '/favourites', { + await $api(config.public.baseURL + '/favourites', { method: 'DELETE', body: JSON.stringify({ eventGuid: event.guid, @@ -102,9 +104,9 @@ const removeFavourite = async () => { {{ event.title }} {{ event.persons.map(p => p.name).join(", ") }} - {{ event.track.name }} + {{ event.track?.name }} -