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:
parent
6651557738
commit
57e367d112
2 changed files with 21 additions and 19 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue