fix(Bubble Node): Fix pagination issue when returning all objects (#5483)

This commit is contained in:
Jonathan Bennetts 2023-02-16 09:01:56 +00:00 committed by GitHub
parent 71cba06b7c
commit 1a20fd9f46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -69,9 +69,10 @@ export async function bubbleApiRequestAllItems(
let responseData;
qs.limit = 100;
qs.cursor = 0;
do {
responseData = await bubbleApiRequest.call(this, method, endpoint, body, qs);
qs.cursor = responseData.cursor;
qs.cursor += qs.limit;
returnData.push.apply(returnData, responseData.response.results);
} while (responseData.response.remaining !== 0);