parent
293ac99709
commit
ff3d0af513
|
@ -21,10 +21,10 @@ func FormatSQL(tx *gorm.DB, order *Ordering, paginate *Pagination) *gorm.DB {
|
||||||
}
|
}
|
||||||
|
|
||||||
if order != nil && order.OrderBy != nil {
|
if order != nil && order.OrderBy != nil {
|
||||||
desc := true
|
desc := false
|
||||||
if order.OrderDirection != nil && order.OrderDirection.IsValid() {
|
if order.OrderDirection != nil && order.OrderDirection.IsValid() {
|
||||||
if *order.OrderDirection == OrderDirectionAsc {
|
if *order.OrderDirection == OrderDirectionDesc {
|
||||||
desc = false
|
desc = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue