feat: rm redundant validation

This commit is contained in:
Rohit
2025-05-28 15:06:09 +05:30
parent 3f78a1323e
commit 76dffd260d

View File

@@ -1079,20 +1079,7 @@ export const IntegrationSettingsModal = ({
<Button
variant="contained"
startIcon={<AddIcon />}
onClick={() => {
if (!newWebhook.url) {
setUrlError("Please provide webhook URL");
return;
}
if (!newWebhook.events || newWebhook.events.length === 0) {
setUrlError("Please select at least one event");
return;
}
if (!validateWebhookData(newWebhook.url, newWebhook.events)) {
return;
}
addWebhookSetting();
}}
onClick={addWebhookSetting}
disabled={!newWebhook.url || !newWebhook.events || newWebhook.events.length === 0 || loading || !!urlError}
>
Add New Webhook