Update gitea go-sdk to v0.15.0 (#385)
Update "code.gitea.io/sdk/gitea" to latest release Reviewed-on: https://gitea.com/gitea/tea/pulls/385 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-committed-by: 6543 <6543@obermui.de>
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