mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(Strapi Node): Fix issue with pagination (#4991)
This commit is contained in:
@@ -92,7 +92,7 @@ export async function strapiApiRequestAllItems(
|
||||
let responseData;
|
||||
if (apiVersion === 'v4') {
|
||||
query['pagination[pageSize]'] = 20;
|
||||
query['pagination[page]'] = 0;
|
||||
query['pagination[page]'] = 1;
|
||||
do {
|
||||
({ data: responseData } = await strapiApiRequest.call(
|
||||
this,
|
||||
@@ -103,7 +103,7 @@ export async function strapiApiRequestAllItems(
|
||||
undefined,
|
||||
headers,
|
||||
));
|
||||
query['pagination[page]'] += query['pagination[pageSize]'];
|
||||
query['pagination[page]']++;
|
||||
returnData.push.apply(returnData, responseData as IDataObject[]);
|
||||
} while (responseData.length !== 0);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user