From 3ef35a8c43c951c3df58df369a5c157fd0180eaf Mon Sep 17 00:00:00 2001 From: Gronod Date: Tue, 19 May 2026 21:16:31 +0100 Subject: [PATCH] fix(webhooks): Send full notification object to test endpoint 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 --- public/app.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/public/app.js b/public/app.js index dbef214..2aaa750 100644 --- a/public/app.js +++ b/public/app.js @@ -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();