aboutsummaryrefslogtreecommitdiff
path: root/internal/route/api/v1/convert/utils.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-02-22 09:05:26 +0800
committerGitHub <noreply@github.com>2020-02-22 09:05:26 +0800
commit648d9e253c1924b832248f26fee42b2fb64dc3bc (patch)
tree51649fad974cd7284a47d30e412c90e7ab72cd2c /internal/route/api/v1/convert/utils.go
parent5b14cc6f0b7b661beb2640a94bd15660cdb48587 (diff)
conf: overhaul server settings (#5928)
* conf: rename package * Requires Go 1.12 * Fix lint * Fix lint * Overhaul * db: fix tests * Save my work * Fix tests * Server.UnixSocketPermission * Server.LocalRootURL * SSH settings * Server.OfflineMode * Save my work * App.Version * Remove [server] STATIC_ROOT_PATH * Server.LandingURL
Diffstat (limited to 'internal/route/api/v1/convert/utils.go')
-rw-r--r--internal/route/api/v1/convert/utils.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/route/api/v1/convert/utils.go b/internal/route/api/v1/convert/utils.go
index 01b3f246..13668091 100644
--- a/internal/route/api/v1/convert/utils.go
+++ b/internal/route/api/v1/convert/utils.go
@@ -5,15 +5,15 @@
package convert
import (
- "gogs.io/gogs/internal/setting"
+ "gogs.io/gogs/internal/conf"
)
// ToCorrectPageSize makes sure page size is in allowed range.
func ToCorrectPageSize(size int) int {
if size <= 0 {
size = 10
- } else if size > setting.API.MaxResponseItems {
- size = setting.API.MaxResponseItems
+ } else if size > conf.API.MaxResponseItems {
+ size = conf.API.MaxResponseItems
}
return size
}