From 6651557738fe9f1ab796ca776dc37906eb3e66fc Mon Sep 17 00:00:00 2001 From: Sean Morley Date: Fri, 3 Jan 2025 09:47:05 -0500 Subject: [PATCH] feat: include adventure visits in collection update requests --- frontend/src/lib/components/AdventureCard.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/AdventureCard.svelte b/frontend/src/lib/components/AdventureCard.svelte index b77b8ea..49990d5 100644 --- a/frontend/src/lib/components/AdventureCard.svelte +++ b/frontend/src/lib/components/AdventureCard.svelte @@ -80,7 +80,7 @@ headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ collection: null }) + body: JSON.stringify({ collection: null, visits: adventure.visits }) }); if (res.ok) { addToast('info', `${$t('adventures.collection_remove_success')}`); @@ -97,7 +97,7 @@ headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ collection: collectionId }) + body: JSON.stringify({ collection: collectionId, visits: adventure.visits }) }); if (res.ok) { console.log('Adventure linked to collection');