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:
@@ -1396,7 +1396,7 @@ async function testSonarrWebhook() {
|
|||||||
'Content-Type': 'application/json',
|
'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');
|
if (!res.ok) throw new Error('Test failed');
|
||||||
await fetchWebhookStatus();
|
await fetchWebhookStatus();
|
||||||
@@ -1424,7 +1424,7 @@ async function testRadarrWebhook() {
|
|||||||
'Content-Type': 'application/json',
|
'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');
|
if (!res.ok) throw new Error('Test failed');
|
||||||
await fetchWebhookStatus();
|
await fetchWebhookStatus();
|
||||||
|
|||||||
Reference in New Issue
Block a user