mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 12:44:07 -08:00
⚡ Rename webhookPath parameter on node to webhookId
This commit is contained in:
parent
17ee152eaf
commit
cee5c522de
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -297,7 +297,7 @@ export interface INode {
|
|||
continueOnFail?: boolean;
|
||||
parameters: INodeParameters;
|
||||
credentials?: INodeCredentials;
|
||||
webhookPath?: string;
|
||||
webhookId?: string;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue