fix: update deleteAdventure function to use DELETE method for API call
This commit is contained in:
@@ -60,11 +60,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function deleteAdventure() {
|
async function deleteAdventure() {
|
||||||
let res = await fetch(`/adventures/${adventure.id}?/delete`, {
|
let res = await fetch(`/api/adventures/${adventure.id}`, {
|
||||||
method: 'POST',
|
method: 'DELETE'
|
||||||
headers: {
|
|
||||||
'Content-Type': 'application/x-www-form-urlencoded'
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
addToast('info', $t('adventures.adventure_delete_success'));
|
addToast('info', $t('adventures.adventure_delete_success'));
|
||||||
|
|||||||
Reference in New Issue
Block a user