mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
Merge 2665be2a9c
into d2dd1796a8
This commit is contained in:
commit
31e7421d26
|
@ -113,8 +113,13 @@ export async function shopifyApiRequestAllItems(
|
|||
responseData = await shopifyApiRequest.call(this, method, resource, body, query, uri, {
|
||||
resolveWithFullResponse: true,
|
||||
});
|
||||
if (responseData.headers.link) {
|
||||
uri = responseData.headers.link.split(';')[0].replace('<', '').replace('>', '');
|
||||
if (responseData.headers.link?.includes('rel="next"')) {
|
||||
uri = responseData.headers.link
|
||||
.split(', ')
|
||||
.filter((s: string) => s.includes('rel="next"'))[0]
|
||||
.split(';')[0]
|
||||
.replace('<', '')
|
||||
.replace('>', '');
|
||||
}
|
||||
returnData.push.apply(returnData, responseData.body[propertyName] as IDataObject[]);
|
||||
} while (responseData.headers.link?.includes('rel="next"'));
|
||||
|
|
Loading…
Reference in a new issue