update: webhooks
This commit is contained in:
parent
d837b1590a
commit
a3c0a0422c
|
@ -204,6 +204,7 @@ const AddWebhookModal = () => {
|
||||||
};
|
};
|
||||||
const saveData = async () => {
|
const saveData = async () => {
|
||||||
if (!validateData()) return;
|
if (!validateData()) return;
|
||||||
|
setLoading(true);
|
||||||
let params: any = {
|
let params: any = {
|
||||||
[INPUT_FIELDS.EVENT_NAME]: webhook[INPUT_FIELDS.EVENT_NAME],
|
[INPUT_FIELDS.EVENT_NAME]: webhook[INPUT_FIELDS.EVENT_NAME],
|
||||||
[INPUT_FIELDS.ENDPOINT]: webhook[INPUT_FIELDS.ENDPOINT],
|
[INPUT_FIELDS.ENDPOINT]: webhook[INPUT_FIELDS.ENDPOINT],
|
||||||
|
@ -223,6 +224,7 @@ const AddWebhookModal = () => {
|
||||||
status: 'error',
|
status: 'error',
|
||||||
position: 'bottom-right',
|
position: 'bottom-right',
|
||||||
});
|
});
|
||||||
|
setLoading(false);
|
||||||
return;
|
return;
|
||||||
} else if (res.data?._add_webhook) {
|
} else if (res.data?._add_webhook) {
|
||||||
toast({
|
toast({
|
||||||
|
@ -234,6 +236,7 @@ const AddWebhookModal = () => {
|
||||||
setWebhook({ ...initWebhookData });
|
setWebhook({ ...initWebhookData });
|
||||||
onClose();
|
onClose();
|
||||||
}
|
}
|
||||||
|
setLoading(false);
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user