mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 23:09:37 +02:00
fix: update deleteAdventure function to use DELETE method for API call
This commit is contained in:
parent
f4450b6a38
commit
0cee4c386d
1 changed files with 2 additions and 5 deletions
|
@ -60,11 +60,8 @@
|
|||
}
|
||||
|
||||
async function deleteAdventure() {
|
||||
let res = await fetch(`/adventures/${adventure.id}?/delete`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
let res = await fetch(`/api/adventures/${adventure.id}`, {
|
||||
method: 'DELETE'
|
||||
});
|
||||
if (res.ok) {
|
||||
addToast('info', $t('adventures.adventure_delete_success'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue