mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-05 13:25:58 +01:00
code.gitea.io/sdk/gitea v0.14.0 -> v0.15.1 (#18186)
This commit is contained in:
9
vendor/code.gitea.io/sdk/gitea/list_options.go
generated
vendored
9
vendor/code.gitea.io/sdk/gitea/list_options.go
generated
vendored
@@ -26,8 +26,13 @@ func (o ListOptions) getURLQuery() url.Values {
|
||||
return query
|
||||
}
|
||||
|
||||
func (o ListOptions) setDefaults() {
|
||||
if o.Page < 1 {
|
||||
// setDefaults set default pagination options if none or wrong are set
|
||||
// if you set -1 as page it will set all to 0
|
||||
func (o *ListOptions) setDefaults() {
|
||||
if o.Page < 0 {
|
||||
o.Page, o.PageSize = 0, 0
|
||||
return
|
||||
} else if o.Page == 0 {
|
||||
o.Page = 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user