mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(Zoho Node): Fix pagination issue (#3129)
This commit is contained in:
committed by
GitHub
parent
5e54249c41
commit
47bbe9857b
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user