Merge pull request #454 from seanmorley15/csrf_error

Csrf error
This commit is contained in:
Sean Morley
2025-01-17 17:15:42 -05:00
committed by GitHub
11 changed files with 32 additions and 18 deletions

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