Rename webhookPath parameter on node to webhookId

This commit is contained in:
Jan Oberhauser
2020-06-10 16:17:16 +02:00
parent 17ee152eaf
commit cee5c522de
3 changed files with 5 additions and 5 deletions

View File

@@ -297,7 +297,7 @@ export interface INode {
continueOnFail?: boolean;
parameters: INodeParameters;
credentials?: INodeCredentials;
webhookPath?: string;
webhookId?: string;
}

View File

@@ -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;
}