fix(medusa): add support for order field on GET /admin/orders (#6258)

**What**
- Adds support for `order` field on `GET /admin/orders`
This commit is contained in:
Kasper Fabricius Kristensen
2024-01-29 16:00:45 +00:00
committed by GitHub
parent 8ec093dc07
commit 90cff0777f
4 changed files with 35 additions and 0 deletions
@@ -152,6 +152,7 @@ import { cleanResponseData } from "../../../../utils/clean-response-data"
* - (query) limit=50 {integer} Limit the number of orders returned.
* - (query) expand {string} Comma-separated relations that should be expanded in the returned order.
* - (query) fields {string} Comma-separated fields that should be included in the returned order.
* - (query) order {string} A order field to sort-order the retrieved orders by.
* x-codegen:
* method: list
* queryParams: AdminGetOrdersParams
@@ -277,4 +278,11 @@ export class AdminGetOrdersParams extends AdminListOrdersSelector {
@IsString()
@IsOptional()
fields?: string
/**
* The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.
*/
@IsOptional()
@IsString()
order?: string
}