fix(node): Freshdesk - fix issue when getAll operation requires non existent options

This commit is contained in:
Michael Kret 2022-08-19 16:42:15 +03:00 committed by GitHub
parent 43e054f5ab
commit 329fe9581f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View file

@ -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',

View file

@ -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<any> {
) {
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<any> {
) {
const returnData: IDataObject[] = [];
let responseData;