More unit tests and html coverage report

also fixes a limit bug on listquery
This commit is contained in:
Jamie Curnow
2023-07-27 12:38:35 +10:00
parent e4e70ae6be
commit 9faa36315f
19 changed files with 479 additions and 183 deletions

View File

@ -30,8 +30,10 @@ func List(pageInfo model.PageInfo, filters []model.Filter, expand []string) (ent
}
// Get rows
dbo = entity.AddOffsetLimitToList(dbo, &pageInfo)
dbo = entity.AddOrderToList(dbo, pageInfo.Sort, defaultSort)
items := make([]Model, 0)
if res := entity.AddOrderToList(dbo, &pageInfo, defaultSort).Find(&items); res.Error != nil {
if res := dbo.Find(&items); res.Error != nil {
return result, res.Error
}