diff options
author | Cirno the Strongest <1447794+CirnoT@users.noreply.github.com> | 2020-06-09 04:46:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-08 22:46:51 -0400 |
commit | cefbf73aea912c510a8dd194532233076b822d37 (patch) | |
tree | e75a011b7563a27e572f4f93670367589fea09fd /modules | |
parent | 5734524378f9388b7a7466445b0b339e2837a5d8 (diff) | |
download | gitea-cefbf73aea912c510a8dd194532233076b822d37.tar.gz gitea-cefbf73aea912c510a8dd194532233076b822d37.zip |
Honor DEFAULT_PAGING_NUM for API (#11805)
* Honor DEFAULT_PAGING_NUM for API
* set pagination to 10 for tests
* lint
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/convert/utils.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/convert/utils.go b/modules/convert/utils.go index 66fb21be67..ddb8a8820d 100644 --- a/modules/convert/utils.go +++ b/modules/convert/utils.go @@ -11,7 +11,7 @@ import ( // ToCorrectPageSize makes sure page size is in allowed range. func ToCorrectPageSize(size int) int { if size <= 0 { - size = 10 + size = setting.API.DefaultPagingNum } else if size > setting.API.MaxResponseItems { size = setting.API.MaxResponseItems } |