fix(webhooks): Send full notification object to test endpoint
All checks were successful
Build and Push Docker Image / build (push) Successful in 48s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 1m9s
CI / Security audit (push) Successful in 1m23s
CI / Tests & coverage (push) Successful in 1m42s

The /notifications/test endpoint requires the full notification object,
not just the ID. Changed testSonarrWebhook() and testRadarrWebhook() to
send the complete notification object (sonarrSofarr/radarrSofarr).

Fixes: 400 validation error when testing webhooks
This commit is contained in:
2026-05-19 21:16:31 +01:00
parent 0f3c02e52d
commit 3ef35a8c43

View File

@@ -1392,11 +1392,11 @@ async function testSonarrWebhook() {
const res = await fetch('/api/sonarr/notifications/test', {
method: 'POST',
headers: {
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': csrfToken || ''
'X-CSRF-Token': csrfToken || ''
},
body: JSON.stringify({ id: sonarrSofarr.id })
body: JSON.stringify(sonarrSofarr)
});
if (!res.ok) throw new Error('Test failed');
await fetchWebhookStatus();
@@ -1420,11 +1420,11 @@ async function testRadarrWebhook() {
const res = await fetch('/api/radarr/notifications/test', {
method: 'POST',
headers: {
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': csrfToken || ''
'X-CSRF-Token': csrfToken || ''
},
body: JSON.stringify({ id: radarrSofarr.id })
body: JSON.stringify(radarrSofarr)
});
if (!res.ok) throw new Error('Test failed');
await fetchWebhookStatus();