From cee5c522de495d1977a548a9dd1d88c60fcc944c Mon Sep 17 00:00:00 2001 From: Jan Oberhauser Date: Wed, 10 Jun 2020 16:17:16 +0200 Subject: [PATCH] :zap: Rename webhookPath parameter on node to webhookId --- packages/editor-ui/src/views/NodeView.vue | 4 ++-- packages/workflow/src/Interfaces.ts | 2 +- packages/workflow/src/NodeHelpers.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/editor-ui/src/views/NodeView.vue b/packages/editor-ui/src/views/NodeView.vue index 65ff1b5267..e22b98f595 100644 --- a/packages/editor-ui/src/views/NodeView.vue +++ b/packages/editor-ui/src/views/NodeView.vue @@ -949,7 +949,7 @@ export default mixins( newNodeData.name = this.getUniqueNodeName(newNodeData.name); if (nodeTypeData.webhooks && nodeTypeData.webhooks.length) { - newNodeData.webhookPath = uuidv4(); + newNodeData.webhookId = uuidv4(); } await this.addNodes([newNodeData]); @@ -1588,7 +1588,7 @@ export default mixins( // if it's a webhook and the path is empty set the UUID as the default path if (node.type === 'n8n-nodes-base.webhook' && node.parameters.path === '') { - node.parameters.path = node.webhookPath as string; + node.parameters.path = node.webhookId as string; } } diff --git a/packages/workflow/src/Interfaces.ts b/packages/workflow/src/Interfaces.ts index 32f272f25c..393f9e28af 100644 --- a/packages/workflow/src/Interfaces.ts +++ b/packages/workflow/src/Interfaces.ts @@ -297,7 +297,7 @@ export interface INode { continueOnFail?: boolean; parameters: INodeParameters; credentials?: INodeCredentials; - webhookPath?: string; + webhookId?: string; } diff --git a/packages/workflow/src/NodeHelpers.ts b/packages/workflow/src/NodeHelpers.ts index 610aefda56..cede36f5b5 100644 --- a/packages/workflow/src/NodeHelpers.ts +++ b/packages/workflow/src/NodeHelpers.ts @@ -859,13 +859,13 @@ export function getNodeWebhooksBasic(workflow: Workflow, node: INode): IWebhookD */ export function getNodeWebhookPath(workflowId: string, node: INode, path: string, isFullPath?: boolean): string { let webhookPath = ''; - if (node.webhookPath === undefined) { + if (node.webhookId === undefined) { webhookPath = `${workflowId}/${encodeURIComponent(node.name.toLowerCase())}/${path}`; } else { if (isFullPath === true) { return path; } - webhookPath = `${node.webhookPath}/${path}`; + webhookPath = `${node.webhookId}/${path}`; } return webhookPath; }