From 70cea0223cad5d33d4f29e760e9cc9e5613c2a5b Mon Sep 17 00:00:00 2001 From: Jeffrey Dowdle Date: Wed, 7 Aug 2024 12:07:08 +1000 Subject: [PATCH] fix(@dpc-sdp/ripple-tide-api): :bug: fixed getTaxonomy only getting first 50 items --- .../ripple-tide-api/src/services/tide-page.ts | 22 +++++-------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/packages/ripple-tide-api/src/services/tide-page.ts b/packages/ripple-tide-api/src/services/tide-page.ts index 73a4aad296..168cb8afe4 100644 --- a/packages/ripple-tide-api/src/services/tide-page.ts +++ b/packages/ripple-tide-api/src/services/tide-page.ts @@ -327,10 +327,10 @@ export default class TidePageApi extends TideApiBase { async getEntityList( entityType, bundle, - filtering, - includes, - pagination, - sorting, + filtering?, + includes?, + pagination?, + sorting?, { allPages = true } = {} ) { const params: Record = { @@ -442,20 +442,8 @@ export default class TidePageApi extends TideApiBase { } async getTaxonomy(taxonomyName: string) { - const params = { - site: this.site - } try { - const { data: response } = await this.get( - `/taxonomy_term/${taxonomyName}`, - { - params - } - ) - if (response) { - const resource = jsonapiParse.parse(response).data - return resource - } + return await this.getEntityList('taxonomy_term', taxonomyName) } catch (error: any) { throw new ApplicationError('Error fetching taxonomy', { cause: error }) }