order struct
This commit is contained in:
@@ -39,7 +39,7 @@ func (h *OrdersHandler) ListOrders(c fiber.Ctx) error {
|
||||
JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, responseErrors.ErrInvalidBody)))
|
||||
}
|
||||
|
||||
paging, filters, err := query_params.ParseFilters[model.Order](c, columnMappingListOrders)
|
||||
paging, filters, err := query_params.ParseFilters[model.CustomerOrder](c, columnMappingListOrders)
|
||||
if err != nil {
|
||||
return c.Status(responseErrors.GetErrorStatus(err)).
|
||||
JSON(response.Make(nullable.GetNil(""), 0, responseErrors.GetErrorCode(c, err)))
|
||||
@@ -55,7 +55,10 @@ func (h *OrdersHandler) ListOrders(c fiber.Ctx) error {
|
||||
}
|
||||
|
||||
var columnMappingListOrders map[string]string = map[string]string{
|
||||
"order_id": "?",
|
||||
"order_id": "co.id",
|
||||
"user_id": "co.user_id",
|
||||
"country_id": "co.country_id",
|
||||
"status": "co.status",
|
||||
}
|
||||
|
||||
func (h *OrdersHandler) PlaceNewOrder(c fiber.Ctx) error {
|
||||
|
||||
Reference in New Issue
Block a user