niki/param/ordering.go

18 lines
209 B
Go
Raw Normal View History

2024-06-11 18:46:51 +00:00
package param
const (
defaultOrder = "ASC"
)
type OrderRequest struct {
Ordering string
}
func (o *OrderRequest) GetOrder() string {
if len(o.Order) == 0 {
o.Order = defaultOrder
}
return o.Order
}