Skip to content

Commit

Permalink
Fix GetOrderByRepairer default orderby key
Browse files Browse the repository at this point in the history
  • Loading branch information
xaxys committed Aug 2, 2022
1 parent 2128e41 commit 5a0313a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/order/service_order.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func getOrderByRepairerService(id uint, aul *RepairerOrderRequest, auth *model.A
if err := util.Validator.Struct(aul); err != nil {
return model.ErrorValidation(err)
}
aul.OrderBy = util.NotEmpty(aul.OrderBy, "id desc")
aul.OrderBy = util.NotEmpty(aul.OrderBy, "order_id desc")
orders, count, err := dbGetOrderByRepairer(id, aul)
if err != nil {
if errors.Is(err, gorm.ErrRecordNotFound) {
Expand Down

0 comments on commit 5a0313a

Please sign in to comment.