update: webhooks
This commit is contained in:
parent
150b1e5712
commit
390846c85f
|
@ -227,6 +227,7 @@ const UpdateWebhookModal = ({
|
||||||
[WebhookInputDataFields.ENDPOINT]:
|
[WebhookInputDataFields.ENDPOINT]:
|
||||||
webhook[WebhookInputDataFields.ENDPOINT],
|
webhook[WebhookInputDataFields.ENDPOINT],
|
||||||
[WebhookInputDataFields.ENABLED]: webhook[WebhookInputDataFields.ENABLED],
|
[WebhookInputDataFields.ENABLED]: webhook[WebhookInputDataFields.ENABLED],
|
||||||
|
[WebhookInputDataFields.HEADERS]: {},
|
||||||
};
|
};
|
||||||
if (webhook[WebhookInputDataFields.HEADERS].length) {
|
if (webhook[WebhookInputDataFields.HEADERS].length) {
|
||||||
const headers = webhook[WebhookInputDataFields.HEADERS].reduce(
|
const headers = webhook[WebhookInputDataFields.HEADERS].reduce(
|
||||||
|
@ -311,7 +312,10 @@ const UpdateWebhookModal = ({
|
||||||
.map(() => ({ ...initHeadersValidatorData })),
|
.map(() => ({ ...initHeadersValidatorData })),
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
setWebhook({ ...rest, [WebhookInputDataFields.HEADERS]: [] });
|
setWebhook({
|
||||||
|
...rest,
|
||||||
|
[WebhookInputDataFields.HEADERS]: [{ ...initHeadersData }],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [view]);
|
}, [view]);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user