Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getWebhookUrl (webhookData: IWebhookDescription): string {
let baseUrl = this.$store.getters.getWebhookUrl;
if (this.showUrlFor === 'Test') {
baseUrl = this.$store.getters.getWebhookTestUrl;
}
const workflowId = this.$store.getters.workflowId;
const path = this.getValue(webhookData, 'path');
return NodeHelpers.getNodeWebhookUrl(baseUrl, workflowId, this.node, path);
},
},
let baseUrl = additionalData.webhookBaseUrl;
if (isTest === true) {
baseUrl = additionalData.webhookTestBaseUrl;
}
const webhookDescription = getWebhookDescription(name, workflow, node);
if (webhookDescription === undefined) {
return undefined;
}
const path = workflow.getSimpleParameterValue(node, webhookDescription['path']);
if (path === undefined) {
return undefined;
}
return NodeHelpers.getNodeWebhookUrl(baseUrl, workflow.id!, node, path.toString());
}