Fix issue with thrown errors for nodes with multiple webhooks

This commit is contained in:
Jan Oberhauser
2020-10-21 17:50:23 +02:00
parent 717708d3cc
commit b171cfbb10
4 changed files with 25 additions and 28 deletions

View File

@@ -68,12 +68,6 @@ export class TrelloTrigger implements INodeType {
webhookMethods = {
default: {
async checkExists(this: IHookFunctions): Promise<boolean> {
if (this.getWebhookName() === 'setup') {
// Is setup-webhook which only gets used once when
// the webhook gets created so nothing to do.
return true;
}
const credentials = this.getCredentials('trelloApi');
if (credentials === undefined) {
@@ -101,12 +95,6 @@ export class TrelloTrigger implements INodeType {
return false;
},
async create(this: IHookFunctions): Promise<boolean> {
if (this.getWebhookName() === 'setup') {
// Is setup-webhook which only gets used once when
// the webhook gets created so nothing to do.
return true;
}
const webhookUrl = this.getNodeWebhookUrl('default');
const credentials = this.getCredentials('trelloApi');
@@ -137,12 +125,6 @@ export class TrelloTrigger implements INodeType {
return true;
},
async delete(this: IHookFunctions): Promise<boolean> {
if (this.getWebhookName() === 'setup') {
// Is setup-webhook which only gets used once when
// the webhook gets created so nothing to do.
return true;
}
const webhookData = this.getWorkflowStaticData('node');
if (webhookData.webhookId !== undefined) {