🐛 Fix bug with Wordpress pagination (#2172)

* Potential fix for Wordpress API only returning the first 10 items on `wordpressApiRequestAllItems` calls

*  Small improvement to #2097

*  Change back pagination value

Co-authored-by: Jonathan <jonathan.bennetts@gmail.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Ricardo Espinoza 2021-09-05 08:49:19 -04:00 committed by GitHub
parent 6b6710439b
commit 96813fcc05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,7 +60,7 @@ export async function wordpressApiRequestAllItems(this: IExecuteFunctions | ILoa
returnData.push.apply(returnData, responseData.body);
} while (
responseData.headers['x-wp-totalpages'] !== undefined &&
parseInt(responseData.headers['x-wp-totalpages'], 10) < query.page
parseInt(responseData.headers['x-wp-totalpages'], 10) !== query.page
);
return returnData;