mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
feat(Webhook Node): Setting to enable multiple outputs/methods (#9086)
Co-authored-by: Giulio Andreini <andreini@netseven.it>
This commit is contained in:
@@ -28,9 +28,7 @@
|
||||
>
|
||||
<div v-if="isWebhookMethodVisible(webhook)" class="webhook-wrapper">
|
||||
<div class="http-field">
|
||||
<div class="http-method">
|
||||
{{ workflowHelpers.getWebhookExpressionValue(webhook, 'httpMethod') }}<br />
|
||||
</div>
|
||||
<div class="http-method">{{ getWebhookHttpMethod(webhook) }}<br /></div>
|
||||
</div>
|
||||
<div class="url-field">
|
||||
<div class="webhook-url left-ellipsis clickable" @click="copyWebhookUrl(webhook)">
|
||||
@@ -195,12 +193,27 @@ export default defineComponent({
|
||||
return '';
|
||||
},
|
||||
isWebhookMethodVisible(webhook: IWebhookDescription): boolean {
|
||||
try {
|
||||
const method = this.workflowHelpers.getWebhookExpressionValue(webhook, 'httpMethod', false);
|
||||
if (Array.isArray(method) && method.length !== 1) {
|
||||
return false;
|
||||
}
|
||||
} catch (error) {}
|
||||
|
||||
if (typeof webhook.ndvHideMethod === 'string') {
|
||||
return !this.workflowHelpers.getWebhookExpressionValue(webhook, 'ndvHideMethod');
|
||||
}
|
||||
|
||||
return !webhook.ndvHideMethod;
|
||||
},
|
||||
|
||||
getWebhookHttpMethod(webhook: IWebhookDescription): string {
|
||||
const method = this.workflowHelpers.getWebhookExpressionValue(webhook, 'httpMethod', false);
|
||||
if (Array.isArray(method)) {
|
||||
return method[0];
|
||||
}
|
||||
return method;
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user