More unit tests and html coverage report

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

No files matched your search

+3 -1
View File
@@ -37,8 +37,10 @@ func List(pageInfo model.PageInfo, filters []model.Filter) (entity.ListResponse,
}
// 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
}