forked from ebhomengo/niki
18 lines
209 B
Go
18 lines
209 B
Go
|
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
|
||
|
}
|