Skip to content

Commit 58689fc

Browse files
Fixed missing webhook module
1 parent cb5db7c commit 58689fc

File tree

2 files changed

+495
-0
lines changed

2 files changed

+495
-0
lines changed

app/forms.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,13 @@ def validate_custom_headers(self, field):
178178
def validate_url(self, field):
179179
if not (field.data.startswith('http://') or field.data.startswith('https://')):
180180
raise ValidationError('URL must start with http:// or https://')
181+
182+
# Enhanced validation using webhook module
183+
try:
184+
from app.webhooks import validate_webhook_url
185+
validation_result = validate_webhook_url(self.webhook_type.data, field.data)
186+
if not validation_result['valid']:
187+
raise ValidationError(validation_result['message'])
188+
except ImportError:
189+
# Fallback to basic validation if webhook module isn't available
190+
pass

0 commit comments

Comments
 (0)