Skip to content

Commit

Permalink
fix(QuickBooks Node) Fix pagination (#3169)
Browse files Browse the repository at this point in the history
* Fixed pagination issue

* Removed unused import
  • Loading branch information
Joffcom authored Apr 22, 2022
1 parent bc5749b commit a790dca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/nodes-base/nodes/QuickBooks/GenericFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
IDataObject,
ILoadOptionsFunctions,
INodeExecutionData,
INodeProperties,
INodePropertyOptions,
NodeApiError,
} from 'n8n-workflow';
Expand Down Expand Up @@ -126,7 +125,11 @@ export async function quickBooksApiRequestAllItems(
const maxResults = 1000;
const returnData: IDataObject[] = [];

const maxCount = await getCount.call(this, method, endpoint, qs);
const maxCountQuery = {
query: `SELECT COUNT(*) FROM ${resource}`,
} as IDataObject;

const maxCount = await getCount.call(this, method, endpoint, maxCountQuery);

const originalQuery = qs.query as string;

Expand Down

0 comments on commit a790dca

Please sign in to comment.