Skip to content

Commit

Permalink
Fixed api mapping sort
Browse files Browse the repository at this point in the history
  • Loading branch information
dlymonkai committed Nov 19, 2024
1 parent 81deab0 commit 8c0556d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/network/src/api/inspection/mappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()}`;
}
4 changes: 2 additions & 2 deletions packages/network/src/api/models/inspection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ export interface ApiInspectionPost {
}

export interface ApiInspectionsSortRequest {
sort_by_property?: string;
sort_drder?: SortOrder;
order_by?: string;
pagination_order?: SortOrder;
}

0 comments on commit 8c0556d

Please sign in to comment.