fix(Microsoft ToDo Node): Fix pagination issue when getting all items (#4222)

This commit is contained in:
Jonathan Bennetts 2022-10-03 10:46:48 +01:00 committed by GitHub
parent fd22b3fbdf
commit 4595b54e56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,6 +55,9 @@ export async function microsoftApiRequestAllItems(
do {
responseData = await microsoftApiRequest.call(this, method, endpoint, body, query, uri);
uri = responseData['@odata.nextLink'];
if (uri && uri.includes('$top')) {
delete query['$top'];
}
returnData.push.apply(returnData, responseData[propertyName]);
} while (responseData['@odata.nextLink'] !== undefined);