diff options
author | Richard Mahn <richmahn@users.noreply.github.com> | 2019-02-06 11:19:26 -0700 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2019-02-06 18:19:26 +0000 |
commit | da1edbfb79566e9d31f43ee85eb2e9fc9b52695b (patch) | |
tree | 6e81098a8ddb5695b52a6a136bb24286fb8a8c9b /modules | |
parent | 0c840a924a9a78556dafdc3e558bdcfe3c704201 (diff) | |
download | gitea-da1edbfb79566e9d31f43ee85eb2e9fc9b52695b.tar.gz gitea-da1edbfb79566e9d31f43ee85eb2e9fc9b52695b.zip |
Feature - Pagination for git tree API (#5838)
* Feature - Pagination for git tree API
* Handles case when page is negative
* Does a for loop over the start and end rather than all entries
* Removed redundent logic
* Adds per_page as a query parameter
* Adds DEFAULT_GIT_TREES_PER_PAGE for settings, ran make fmt
* Fix typo in cheat-sheet en
* Makes page start at 1, generated swagger
* Use updates to SDK
* Updates to use latest sdk
* Updates swagger for tree api
* Adds test for GetTreeBySHA
* Updates per PR reviews
* Updates per PR reviews
* Remove file
* Formatting
* Fix to swagger file
* Fix to swagger
* Update v1_json.tmpl
* Fix to swagger file
Diffstat (limited to 'modules')
-rw-r--r-- | modules/setting/setting.go | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 0859b81c40..42f1de425e 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -561,13 +561,15 @@ var ( // API settings API = struct { - EnableSwagger bool - MaxResponseItems int - DefaultPagingNum int + EnableSwagger bool + MaxResponseItems int + DefaultPagingNum int + DefaultGitTreesPerPage int }{ - EnableSwagger: true, - MaxResponseItems: 50, - DefaultPagingNum: 30, + EnableSwagger: true, + MaxResponseItems: 50, + DefaultPagingNum: 30, + DefaultGitTreesPerPage: 1000, } U2F = struct { |