mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
fix(Zoho Node): Fix pagination issue (#3129)
This commit is contained in:
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 &&
|
||||
|
|
Loading…
Reference in a new issue