fix(webhooks): Send full notification object to test endpoint
All checks were successful
All checks were successful
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user