1
0
Fork 0
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:
Sean Morley 2025-01-17 17:15:18 -05:00
parent f4450b6a38
commit 0cee4c386d

View file

@ -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'));