fix up more tests, fix missing required changes, etc

This commit is contained in:
kim 2025-03-25 12:12:09 +00:00
commit 64564496f1
10 changed files with 130 additions and 84 deletions

View file

@ -41,13 +41,10 @@ func nextPageParams(
}
// toDirection converts page order to timeline direction.
func toDirection(o paging.Order) structr.Direction {
switch o {
case paging.OrderAscending:
func toDirection(order paging.Order) structr.Direction {
if order.Ascending() {
return structr.Asc
case paging.OrderDescending:
} else /* i.e. descending */ {
return structr.Desc
default:
return false
}
}