From 0f5bcd59c87939bfe5165219e4e4b6f047f0df38 Mon Sep 17 00:00:00 2001 From: Ricardo Espinoza Date: Wed, 30 Sep 2020 10:12:39 -0400 Subject: [PATCH] :bug: Fix issue #987 (#990) --- packages/nodes-base/nodes/Pipedrive/GenericFunctions.ts | 4 ++-- packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/nodes-base/nodes/Pipedrive/GenericFunctions.ts b/packages/nodes-base/nodes/Pipedrive/GenericFunctions.ts index 17033eaf7..4b4d29b98 100644 --- a/packages/nodes-base/nodes/Pipedrive/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Pipedrive/GenericFunctions.ts @@ -34,7 +34,7 @@ export interface ICustomProperties { * @param {object} body * @returns {Promise} */ -export async function pipedriveApiRequest(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, body: IDataObject, query?: IDataObject, formData?: IDataObject, downloadFile?: boolean): Promise { // tslint:disable-line:no-any +export async function pipedriveApiRequest(this: IHookFunctions | IExecuteFunctions | ILoadOptionsFunctions, method: string, endpoint: string, body: IDataObject, query: IDataObject = {}, formData?: IDataObject, downloadFile?: boolean): Promise { // tslint:disable-line:no-any const authenticationMethod = this.getNodeParameter('authentication', 0); const options: OptionsWithUri = { @@ -67,7 +67,7 @@ export async function pipedriveApiRequest(this: IHookFunctions | IExecuteFunctio let responseData; try { - if (authenticationMethod === 'basicAuth' || authenticationMethod === 'apiToken') { + if (authenticationMethod === 'basicAuth' || authenticationMethod === 'apiToken' || authenticationMethod === 'none') { const credentials = this.getCredentials('pipedriveApi'); if (credentials === undefined) { diff --git a/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts b/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts index 06aa9c923..6a6bfa1a6 100644 --- a/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts +++ b/packages/nodes-base/nodes/Pipedrive/PipedriveTrigger.node.ts @@ -215,7 +215,6 @@ export class PipedriveTrigger implements INodeType { async create(this: IHookFunctions): Promise { const webhookUrl = this.getNodeWebhookUrl('default'); const authentication = this.getNodeParameter('authentication', 0) as string; - const eventAction = this.getNodeParameter('action') as string; const eventObject = this.getNodeParameter('object') as string;