fix(webhooks): Use numeric method value (1=POST) in notification payload
All checks were successful
All checks were successful
The webhook notification payload was using string 'POST' for the method field, but Sonarr/Radarr API expects numeric values: - 1 = POST - 2 = PUT Also added onManualInteractionRequired: false to match the schema. Fixes: Radarr/Sonarr rejecting webhook configuration with validation errors
This commit is contained in:
@@ -196,16 +196,17 @@ router.post('/notifications/sofarr-webhook', async (req, res) => {
|
||||
configContract: 'WebhookSettings',
|
||||
fields: [
|
||||
{ name: 'url', value: webhookUrl },
|
||||
{ name: 'method', value: 'POST' },
|
||||
{ name: 'method', value: 1 },
|
||||
{ name: 'headers', value: [{ key: 'X-Sofarr-Webhook-Secret', value: webhookSecret }] }
|
||||
],
|
||||
onGrab: true,
|
||||
onDownload: true,
|
||||
onImport: true,
|
||||
onUpgrade: true,
|
||||
onImport: true,
|
||||
onRename: false,
|
||||
onHealthIssue: false,
|
||||
onApplicationUpdate: false
|
||||
onApplicationUpdate: false,
|
||||
onManualInteractionRequired: false
|
||||
};
|
||||
|
||||
if (existingNotification) {
|
||||
|
||||
@@ -196,16 +196,17 @@ router.post('/notifications/sofarr-webhook', async (req, res) => {
|
||||
configContract: 'WebhookSettings',
|
||||
fields: [
|
||||
{ name: 'url', value: webhookUrl },
|
||||
{ name: 'method', value: 'POST' },
|
||||
{ name: 'method', value: 1 },
|
||||
{ name: 'headers', value: [{ key: 'X-Sofarr-Webhook-Secret', value: webhookSecret }] }
|
||||
],
|
||||
onGrab: true,
|
||||
onDownload: true,
|
||||
onImport: true,
|
||||
onUpgrade: true,
|
||||
onImport: true,
|
||||
onRename: false,
|
||||
onHealthIssue: false,
|
||||
onApplicationUpdate: false
|
||||
onApplicationUpdate: false,
|
||||
onManualInteractionRequired: false
|
||||
};
|
||||
|
||||
if (existingNotification) {
|
||||
|
||||
Reference in New Issue
Block a user