feat: validate url format
This commit is contained in:
@@ -133,6 +133,13 @@ export const IntegrationSettingsModal = ({
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
new URL(url);
|
||||||
|
} catch {
|
||||||
|
setUrlError("Please provide a valid URL");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const existingWebhook = settings.webhooks?.find(
|
const existingWebhook = settings.webhooks?.find(
|
||||||
(webhook) => webhook.url === url && webhook.id !== excludeId
|
(webhook) => webhook.url === url && webhook.id !== excludeId
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user