mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
🐛 Fix issue with not returning more than 1000 items
This commit is contained in:
parent
1566dafb3e
commit
4c029e5401
|
@ -66,7 +66,8 @@ export async function spotifyApiRequestAllItems(this: IHookFunctions | IExecuteF
|
||||||
uri = responseData.next || responseData[propertyName.split('.')[0]].next;
|
uri = responseData.next || responseData[propertyName.split('.')[0]].next;
|
||||||
//remove the query as the query parameters are already included in the next, else api throws error.
|
//remove the query as the query parameters are already included in the next, else api throws error.
|
||||||
query = {};
|
query = {};
|
||||||
if (uri?.includes('offset=1000')) {
|
if (uri?.includes('offset=1000') && endpoint === '/search') {
|
||||||
|
// The search endpoint has a limit of 1000 so step before it returns a 404
|
||||||
return returnData;
|
return returnData;
|
||||||
}
|
}
|
||||||
} while (
|
} while (
|
||||||
|
|
Loading…
Reference in a new issue