From 8c0556dd0bd9458a29ba243a4fbbedc70ebafff1 Mon Sep 17 00:00:00 2001 From: David Ly Date: Tue, 19 Nov 2024 09:46:25 +0100 Subject: [PATCH] Fixed api mapping sort --- packages/network/src/api/inspection/mappers.ts | 4 ++-- packages/network/src/api/models/inspection.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/network/src/api/inspection/mappers.ts b/packages/network/src/api/inspection/mappers.ts index eb07b362..41e2a0e2 100644 --- a/packages/network/src/api/inspection/mappers.ts +++ b/packages/network/src/api/inspection/mappers.ts @@ -697,10 +697,10 @@ export function mapApiInspectionsUrlParamsGet(options: GetInspectionsOptions): s }); } if (options.sort?.sortByProperty) { - params.append('sort_by_property', options.sort.sortByProperty); + params.append('order_by', options.sort.sortByProperty); } if (options.sort?.sortOrder) { - params.append('sort_order', options.sort.sortOrder.toString()); + params.append('pagination_order', options.sort.sortOrder.toString()); } return `${url}${params.toString()}`; } diff --git a/packages/network/src/api/models/inspection.ts b/packages/network/src/api/models/inspection.ts index 7af35f3b..e1df6dea 100644 --- a/packages/network/src/api/models/inspection.ts +++ b/packages/network/src/api/models/inspection.ts @@ -78,6 +78,6 @@ export interface ApiInspectionPost { } export interface ApiInspectionsSortRequest { - sort_by_property?: string; - sort_drder?: SortOrder; + order_by?: string; + pagination_order?: SortOrder; }