Fix bug on Paddle-Node with returning all users

This commit is contained in:
Jan Oberhauser 2020-10-22 23:50:44 +02:00
parent 5f2d528046
commit b04769287d

View file

@ -58,8 +58,9 @@ export async function paddleApiRequestAllItems(this: IHookFunctions | IExecuteFu
do { do {
responseData = await paddleApiRequest.call(this, endpoint, method, body, query); responseData = await paddleApiRequest.call(this, endpoint, method, body, query);
returnData.push.apply(returnData, responseData[propertyName]); returnData.push.apply(returnData, responseData[propertyName]);
body.page++;
} while ( } while (
responseData[propertyName].length !== 0 responseData[propertyName].length !== 0 && responseData[propertyName].length === body.results_per_page
); );
return returnData; return returnData;