mirror of
https://github.com/go-gitea/gitea
synced 2024-11-05 01:34:25 +00:00
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
(cherry picked from commit 2b2b3e4c37
)
This commit is contained in:
parent
87a82138c6
commit
56660c3fd0
@ -38,7 +38,10 @@ func (opts ListOptions) setEnginePagination(e Engine) Engine {
|
||||
}
|
||||
|
||||
func (opts ListOptions) setDefaultValues() {
|
||||
if opts.PageSize <= 0 || opts.PageSize > setting.API.MaxResponseItems {
|
||||
if opts.PageSize <= 0 {
|
||||
opts.PageSize = setting.API.DefaultPagingNum
|
||||
}
|
||||
if opts.PageSize > setting.API.MaxResponseItems {
|
||||
opts.PageSize = setting.API.MaxResponseItems
|
||||
}
|
||||
if opts.Page <= 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user