diff --git a/src/qrzws/main.go b/src/qrzws/main.go index 2b11ad4..975c38e 100644 --- a/src/qrzws/main.go +++ b/src/qrzws/main.go @@ -113,9 +113,9 @@ func BuildQuery(config config.Config, qrzdt QrzDatatableInput) (qrz []qrz.Qrz, e return nil, err } - if orderdir == "DESC" { + if orderdir == "desc" { 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) } else { err = config.Db.Where(searchstatement).Limit(limit, offset).Asc("qrz").Select(selectstatement).Find(&qrz)