mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-23 11:44:06 -08:00
🐛 Fix bug with GetAll on Ghost-Node
This commit is contained in:
parent
9ef13e96ac
commit
fe71c665fe
|
@ -70,16 +70,17 @@ export async function ghostApiRequestAllItems(this: IHookFunctions | IExecuteFun
|
|||
|
||||
let responseData;
|
||||
|
||||
query.limit = 20;
|
||||
query.limit = 50;
|
||||
query.page = 1;
|
||||
|
||||
let uri: string | undefined;
|
||||
|
||||
do {
|
||||
responseData = await ghostApiRequest.call(this, method, endpoint, body, query, uri);
|
||||
uri = responseData.meta.pagination.next;
|
||||
query.page = responseData.meta.pagination.next;
|
||||
returnData.push.apply(returnData, responseData[propertyName]);
|
||||
} while (
|
||||
responseData.meta.pagination.next !== null
|
||||
query.page !== null
|
||||
);
|
||||
return returnData;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue