From 17ae0ed3eef54d96bd179ff7fec0540cf3024748 Mon Sep 17 00:00:00 2001 From: ᴜɴᴋɴᴡᴏɴ Date: Sat, 29 Feb 2020 16:29:17 +0800 Subject: conf: overhaul settings (#5953) * Overhaul cache settings * Overhaul HTTP settings * conf: overhaul more settings * log: make LGTM happy * travis: upload report to Codecov * Add codecov.yml --- internal/cmd/web.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'internal/cmd/web.go') diff --git a/internal/cmd/web.go b/internal/cmd/web.go index 728d5c80..078678b4 100644 --- a/internal/cmd/web.go +++ b/internal/cmd/web.go @@ -92,14 +92,14 @@ func newMacaron() *macaron.Macaron { )) m.Use(macaron.Static( - conf.AvatarUploadPath, + conf.Picture.AvatarUploadPath, macaron.StaticOptions{ Prefix: db.USER_AVATAR_URL_PREFIX, SkipLogging: conf.Server.DisableRouterLog, }, )) m.Use(macaron.Static( - conf.RepositoryAvatarUploadPath, + conf.Picture.RepositoryAvatarUploadPath, macaron.StaticOptions{ Prefix: db.REPO_AVATAR_URL_PREFIX, SkipLogging: conf.Server.DisableRouterLog, @@ -129,15 +129,15 @@ func newMacaron() *macaron.Macaron { SubURL: conf.Server.Subpath, Files: localeFiles, CustomDirectory: filepath.Join(conf.CustomDir(), "conf", "locale"), - Langs: conf.Langs, - Names: conf.Names, + Langs: conf.I18n.Langs, + Names: conf.I18n.Names, DefaultLang: "en-US", Redirect: true, })) m.Use(cache.Cacher(cache.Options{ - Adapter: conf.CacheAdapter, - AdapterConfig: conf.CacheConn, - Interval: conf.CacheInterval, + Adapter: conf.Cache.Adapter, + AdapterConfig: conf.Cache.Host, + Interval: conf.Cache.Interval, })) m.Use(captcha.Captchaer(captcha.Options{ SubURL: conf.Server.Subpath, -- cgit v1.2.3