From 42fa48419bf2f2fd2dcf9d4dcb886e1b8420733f Mon Sep 17 00:00:00 2001 From: Jonathan Bennetts Date: Tue, 25 Jul 2023 11:22:11 +0100 Subject: [PATCH] Fix qs --- packages/nodes-base/nodes/Lemlist/GenericFunctions.ts | 2 +- packages/nodes-base/nodes/Lemlist/Lemlist.node.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nodes-base/nodes/Lemlist/GenericFunctions.ts b/packages/nodes-base/nodes/Lemlist/GenericFunctions.ts index 70e6e5c46501b..5257c0234e71e 100644 --- a/packages/nodes-base/nodes/Lemlist/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Lemlist/GenericFunctions.ts @@ -51,11 +51,11 @@ export async function lemlistApiRequestAllItems( this: IExecuteFunctions | ILoadOptionsFunctions | IHookFunctions, method: string, endpoint: string, + qs: IDataObject = {}, ) { const returnData: IDataObject[] = []; let responseData; - const qs: IDataObject = {}; qs.limit = 100; qs.offset = 0; diff --git a/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts b/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts index 68116d1491a17..e1b3faf0de506 100644 --- a/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts +++ b/packages/nodes-base/nodes/Lemlist/Lemlist.node.ts @@ -133,7 +133,7 @@ export class Lemlist implements INodeType { } if (returnAll) { - responseData = await lemlistApiRequestAllItems.call(this, 'GET', '/activities'); + responseData = await lemlistApiRequestAllItems.call(this, 'GET', '/activities', qs); } else { qs.limit = this.getNodeParameter('limit', i); responseData = await lemlistApiRequest.call(this, 'GET', '/activities', {}, qs); @@ -154,7 +154,7 @@ export class Lemlist implements INodeType { const returnAll = this.getNodeParameter('returnAll', i); if (returnAll) { - responseData = await lemlistApiRequestAllItems.call(this, 'GET', '/campaigns'); + responseData = await lemlistApiRequestAllItems.call(this, 'GET', '/campaigns', {}); } else { const qs = { limit: this.getNodeParameter('limit', i), @@ -279,7 +279,7 @@ export class Lemlist implements INodeType { const returnAll = this.getNodeParameter('returnAll', i); if (returnAll) { - responseData = await lemlistApiRequestAllItems.call(this, 'GET', '/unsubscribes'); + responseData = await lemlistApiRequestAllItems.call(this, 'GET', '/unsubscribes', {}); } else { const qs = { limit: this.getNodeParameter('limit', i),