From 329fe9581f63fe44daba5ef79724d9339cb8c813 Mon Sep 17 00:00:00 2001 From: Michael Kret <88898367+michael-radency@users.noreply.github.com> Date: Fri, 19 Aug 2022 16:42:15 +0300 Subject: [PATCH] fix(node): Freshdesk - fix issue when getAll operation requires non existent options --- packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts | 2 -- packages/nodes-base/nodes/Freshdesk/GenericFunctions.ts | 8 +++----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts b/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts index ad4e818599..c62d7db9c9 100644 --- a/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts +++ b/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts @@ -683,7 +683,6 @@ export class Freshdesk implements INodeType { displayName: 'Priority', name: 'priority', type: 'options', - required: true, options: [ { name: 'Low', @@ -759,7 +758,6 @@ export class Freshdesk implements INodeType { displayName: 'Status', name: 'status', type: 'options', - required: true, options: [ { name: 'Open', diff --git a/packages/nodes-base/nodes/Freshdesk/GenericFunctions.ts b/packages/nodes-base/nodes/Freshdesk/GenericFunctions.ts index dc728c1888..82b5dacf1f 100644 --- a/packages/nodes-base/nodes/Freshdesk/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Freshdesk/GenericFunctions.ts @@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request'; import { BINARY_ENCODING, IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core'; -import { IDataObject, NodeApiError, NodeOperationError } from 'n8n-workflow'; +import { IDataObject, NodeApiError } from 'n8n-workflow'; export async function freshdeskApiRequest( this: IExecuteFunctions | ILoadOptionsFunctions, @@ -13,8 +13,7 @@ export async function freshdeskApiRequest( query: IDataObject = {}, uri?: string, option: IDataObject = {}, - // tslint:disable-next-line:no-any -): Promise { +) { const credentials = await this.getCredentials('freshdeskApi'); const apiKey = `${credentials.apiKey}:X`; @@ -53,8 +52,7 @@ export async function freshdeskApiRequestAllItems( // tslint:disable-next-line:no-any body: any = {}, query: IDataObject = {}, - // tslint:disable-next-line:no-any -): Promise { +) { const returnData: IDataObject[] = []; let responseData;