mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-09-23 19:57:09 +00:00
fix: clear custom payload when switching webhook types (addresses #378)
When switching from generic webhook to discord or other service types, the custom payload template was persisting and being sent incorrectly. Now clears the payload template when switching to non-generic services.
This commit is contained in:
@@ -115,7 +115,10 @@ export function WebhookConfig(props: WebhookConfigProps) {
|
||||
service: template.service,
|
||||
method: template.method,
|
||||
headers: { ...template.headers },
|
||||
name: formData().name || template.name
|
||||
name: formData().name || template.name,
|
||||
// Clear the payload template when switching services
|
||||
// Only generic service should have custom payloads
|
||||
payloadTemplate: service === 'generic' ? formData().payloadTemplate : ''
|
||||
});
|
||||
}
|
||||
setShowServiceDropdown(false);
|
||||
|
||||
Reference in New Issue
Block a user