fixed order direction on columns
This commit is contained in:
parent
7cb2601b3b
commit
357ae512da
@ -113,9 +113,9 @@ func BuildQuery(config config.Config, qrzdt QrzDatatableInput) (qrz []qrz.Qrz, e
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if orderdir == "DESC" {
|
if orderdir == "desc" {
|
||||||
err = config.Db.Where(searchstatement).Limit(limit, offset).Desc(ordercol...).Select(selectstatement).Find(&qrz)
|
err = config.Db.Where(searchstatement).Limit(limit, offset).Desc(ordercol...).Select(selectstatement).Find(&qrz)
|
||||||
} else if orderdir == "ASC" {
|
} else if orderdir == "asc" {
|
||||||
err = config.Db.Where(searchstatement).Limit(limit, offset).Asc(ordercol...).Select(selectstatement).Find(&qrz)
|
err = config.Db.Where(searchstatement).Limit(limit, offset).Asc(ordercol...).Select(selectstatement).Find(&qrz)
|
||||||
} else {
|
} else {
|
||||||
err = config.Db.Where(searchstatement).Limit(limit, offset).Asc("qrz").Select(selectstatement).Find(&qrz)
|
err = config.Db.Where(searchstatement).Limit(limit, offset).Asc("qrz").Select(selectstatement).Find(&qrz)
|
||||||
|
Loading…
Reference in New Issue
Block a user