1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-21 22:09:36 +02:00

refactor: update AdventureSerializer to handle visits data more gracefully and remove visits from request body in AdventureCard

This commit is contained in:
Sean Morley 2025-01-03 09:53:23 -05:00
parent 6651557738
commit 57e367d112
2 changed files with 21 additions and 19 deletions

View file

@ -80,7 +80,7 @@
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ collection: null, visits: adventure.visits })
body: JSON.stringify({ collection: null })
});
if (res.ok) {
addToast('info', `${$t('adventures.collection_remove_success')}`);
@ -97,7 +97,7 @@
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ collection: collectionId, visits: adventure.visits })
body: JSON.stringify({ collection: collectionId })
});
if (res.ok) {
console.log('Adventure linked to collection');