diff --git a/templates/emails.html b/templates/emails.html index d9e2701..f681922 100644 --- a/templates/emails.html +++ b/templates/emails.html @@ -237,7 +237,7 @@ document.addEventListener('click', function(e) { if (!btn) return; const id = btn.dataset.id; if (!confirm('Eintrag #' + id + ' aus dem Log löschen?')) return; - fetch('/api/sent-emails/' + id + '/delete', {method: 'POST'}) + fetch('/api/sent-emails/' + id + '/delete', {method: 'POST', credentials: 'same-origin'}) .then(r => { if (!r.ok) throw new Error('HTTP ' + r.status); return r.json(); }) .then(d => { if (d.success) {