🐛 OneDrive: Fix pagination (#2706)

This commit is contained in:
Tom 2022-01-21 10:46:33 +01:00 committed by GitHub
parent 9fc1d16e7c
commit 55139a4e6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,9 @@ export async function microsoftApiRequestAllItems(this: IExecuteFunctions | ILoa
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