mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(node): Freshdesk - fix issue when getAll operation requires non existent options
This commit is contained in:
parent
43e054f5ab
commit
329fe9581f
|
@ -683,7 +683,6 @@ export class Freshdesk implements INodeType {
|
||||||
displayName: 'Priority',
|
displayName: 'Priority',
|
||||||
name: 'priority',
|
name: 'priority',
|
||||||
type: 'options',
|
type: 'options',
|
||||||
required: true,
|
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'Low',
|
name: 'Low',
|
||||||
|
@ -759,7 +758,6 @@ export class Freshdesk implements INodeType {
|
||||||
displayName: 'Status',
|
displayName: 'Status',
|
||||||
name: 'status',
|
name: 'status',
|
||||||
type: 'options',
|
type: 'options',
|
||||||
required: true,
|
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
name: 'Open',
|
name: 'Open',
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { OptionsWithUri } from 'request';
|
||||||
|
|
||||||
import { BINARY_ENCODING, IExecuteFunctions, ILoadOptionsFunctions } from 'n8n-core';
|
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(
|
export async function freshdeskApiRequest(
|
||||||
this: IExecuteFunctions | ILoadOptionsFunctions,
|
this: IExecuteFunctions | ILoadOptionsFunctions,
|
||||||
|
@ -13,8 +13,7 @@ export async function freshdeskApiRequest(
|
||||||
query: IDataObject = {},
|
query: IDataObject = {},
|
||||||
uri?: string,
|
uri?: string,
|
||||||
option: IDataObject = {},
|
option: IDataObject = {},
|
||||||
// tslint:disable-next-line:no-any
|
) {
|
||||||
): Promise<any> {
|
|
||||||
const credentials = await this.getCredentials('freshdeskApi');
|
const credentials = await this.getCredentials('freshdeskApi');
|
||||||
|
|
||||||
const apiKey = `${credentials.apiKey}:X`;
|
const apiKey = `${credentials.apiKey}:X`;
|
||||||
|
@ -53,8 +52,7 @@ export async function freshdeskApiRequestAllItems(
|
||||||
// tslint:disable-next-line:no-any
|
// tslint:disable-next-line:no-any
|
||||||
body: any = {},
|
body: any = {},
|
||||||
query: IDataObject = {},
|
query: IDataObject = {},
|
||||||
// tslint:disable-next-line:no-any
|
) {
|
||||||
): Promise<any> {
|
|
||||||
const returnData: IDataObject[] = [];
|
const returnData: IDataObject[] = [];
|
||||||
|
|
||||||
let responseData;
|
let responseData;
|
||||||
|
|
Loading…
Reference in a new issue