refactor(webhook): remove singleton webhook logic
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { URL } from 'node:url';
|
||||
import get from 'lodash.get';
|
||||
import Base from './base.js';
|
||||
import App from './app.js';
|
||||
import Flow from './flow.js';
|
||||
@@ -109,25 +108,10 @@ class Step extends Base {
|
||||
|
||||
if (!triggerCommand) return null;
|
||||
|
||||
const { useSingletonWebhook, singletonWebhookRefValueParameter, type } =
|
||||
triggerCommand;
|
||||
|
||||
const isWebhook = type === 'webhook';
|
||||
const isWebhook = triggerCommand.type === 'webhook';
|
||||
|
||||
if (!isWebhook) return null;
|
||||
|
||||
if (singletonWebhookRefValueParameter) {
|
||||
const parameterValue = get(
|
||||
this.parameters,
|
||||
singletonWebhookRefValueParameter
|
||||
);
|
||||
return `/webhooks/connections/${this.connectionId}/${parameterValue}`;
|
||||
}
|
||||
|
||||
if (useSingletonWebhook) {
|
||||
return `/webhooks/connections/${this.connectionId}`;
|
||||
}
|
||||
|
||||
if (this.parameters.workSynchronously) {
|
||||
return `/webhooks/flows/${this.flowId}/sync`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user