diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-01-30 16:55:53 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-30 10:55:53 +0200 |
commit | 5e20fd6dbf52ede60ed9ac7944db0d3f6769cf86 (patch) | |
tree | 519259f05f7e7fc4dd1df4da521e000ce469567b /routers/install.go | |
parent | 0e0424c8ecaf6fa3cdd1fcfc154f188014c63dd8 (diff) | |
download | gitea-5e20fd6dbf52ede60ed9ac7944db0d3f6769cf86.tar.gz gitea-5e20fd6dbf52ede60ed9ac7944db0d3f6769cf86.zip |
Move middlewares to web/middleware (#14480)
Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'routers/install.go')
-rw-r--r-- | routers/install.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/routers/install.go b/routers/install.go index da2631931e..69ae428a54 100644 --- a/routers/install.go +++ b/routers/install.go @@ -20,12 +20,12 @@ import ( "code.gitea.io/gitea/modules/generate" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/middlewares" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/templates" "code.gitea.io/gitea/modules/user" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/modules/web/middleware" "gitea.com/go-chi/session" "gopkg.in/ini.v1" @@ -47,11 +47,11 @@ func InstallInit(next http.Handler) http.Handler { _ = rnd.HTML(resp, 200, string(tplPostInstall), nil) return } - var locale = middlewares.Locale(resp, req) + var locale = middleware.Locale(resp, req) var startTime = time.Now() var ctx = context.Context{ Resp: context.NewResponse(resp), - Flash: &middlewares.Flash{}, + Flash: &middleware.Flash{}, Locale: locale, Render: rnd, Session: session.GetSession(req), @@ -143,7 +143,7 @@ func Install(ctx *context.Context) { form.DefaultEnableTimetracking = setting.Service.DefaultEnableTimetracking form.NoReplyAddress = setting.Service.NoReplyAddress - middlewares.AssignForm(form, ctx.Data) + middleware.AssignForm(form, ctx.Data) ctx.HTML(200, tplInstall) } |