From 47bbe9857b5f3321c9402595041afcb6b96411c4 Mon Sep 17 00:00:00 2001 From: Jonathan Bennetts Date: Thu, 14 Apr 2022 08:41:14 +0100 Subject: [PATCH] fix(Zoho Node): Fix pagination issue (#3129) --- packages/nodes-base/nodes/Zoho/GenericFunctions.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/nodes-base/nodes/Zoho/GenericFunctions.ts b/packages/nodes-base/nodes/Zoho/GenericFunctions.ts index 5b4ae69755..cd691a6d3c 100644 --- a/packages/nodes-base/nodes/Zoho/GenericFunctions.ts +++ b/packages/nodes-base/nodes/Zoho/GenericFunctions.ts @@ -91,15 +91,13 @@ export async function zohoApiRequestAllItems( const returnData: IDataObject[] = []; let responseData; - let uri: string | undefined; qs.per_page = 200; - qs.page = 0; + qs.page = 1; do { - responseData = await zohoApiRequest.call(this, method, endpoint, body, qs, uri); + responseData = await zohoApiRequest.call(this, method, endpoint, body, qs); if (Array.isArray(responseData) && !responseData.length) return returnData; returnData.push(...responseData.data); - uri = responseData.info.more_records; qs.page++; } while ( responseData.info.more_records !== undefined &&