API: Expose its limitation settings (#12714)

* API: Expose its limitation settings

* TESTs

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
6543 2020-09-04 20:10:15 +02:00 committed by GitHub
parent 45c0ec3152
commit 2a52aeec49
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 133 additions and 14 deletions

View file

@ -14,3 +14,11 @@ type GeneralRepoSettings struct {
type GeneralUISettings struct {
AllowedReactions []string `json:"allowed_reactions"`
}
// GeneralAPISettings contains global api settings exposed by it
type GeneralAPISettings struct {
MaxResponseItems int `json:"max_response_items"`
DefaultPagingNum int `json:"default_paging_num"`
DefaultGitTreesPerPage int `json:"default_git_trees_per_page"`
DefaultMaxBlobSize int64 `json:"default_max_blob_size"`
}