feat: rm redundant validation
This commit is contained in:
@@ -1079,20 +1079,7 @@ export const IntegrationSettingsModal = ({
|
|||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
startIcon={<AddIcon />}
|
startIcon={<AddIcon />}
|
||||||
onClick={() => {
|
onClick={addWebhookSetting}
|
||||||
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();
|
|
||||||
}}
|
|
||||||
disabled={!newWebhook.url || !newWebhook.events || newWebhook.events.length === 0 || loading || !!urlError}
|
disabled={!newWebhook.url || !newWebhook.events || newWebhook.events.length === 0 || loading || !!urlError}
|
||||||
>
|
>
|
||||||
Add New Webhook
|
Add New Webhook
|
||||||
|
|||||||
Reference in New Issue
Block a user