diff --git a/packages/cli/package.json b/packages/cli/package.json index fabcf96a4b..e1e172e0d9 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -114,7 +114,7 @@ "sqlite3": "^4.2.0", "sse-channel": "^3.1.1", "tslib": "1.11.2", - "typeorm": "^0.2.24" + "typeorm": "^0.2.30" }, "jest": { "transform": { diff --git a/packages/cli/src/ActiveWorkflowRunner.ts b/packages/cli/src/ActiveWorkflowRunner.ts index 6a955969a8..48709c7aa4 100644 --- a/packages/cli/src/ActiveWorkflowRunner.ts +++ b/packages/cli/src/ActiveWorkflowRunner.ts @@ -253,6 +253,10 @@ export class ActiveWorkflowRunner { method: webhookData.httpMethod, } as IWebhookDb; + if (webhook.webhookPath.includes('/:') && node.webhookId) { + webhook.webhookId = node.webhookId; + } + try { await Db.collections.Webhook?.insert(webhook); diff --git a/packages/cli/src/Interfaces.ts b/packages/cli/src/Interfaces.ts index 443bee6539..4e63151c9c 100644 --- a/packages/cli/src/Interfaces.ts +++ b/packages/cli/src/Interfaces.ts @@ -57,6 +57,7 @@ export interface IWebhookDb { webhookPath: string; method: string; node: string; + webhookId?: string; } export interface IWorkflowBase extends IWorkflowBaseWorkflow {