1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Avoid duplicate SetContextValue call (#33564)

And fix FIXME and TODO
This commit is contained in:
wxiaoguang
2025-02-12 14:25:46 +08:00
committed by GitHub
parent 06f1065636
commit f58f5bb3d8
6 changed files with 3 additions and 7 deletions

View File

@@ -64,7 +64,6 @@ func Contexter() func(next http.Handler) http.Handler {
return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) {
base := context.NewBaseContext(resp, req)
ctx := context.NewWebContext(base, rnd, session.GetSession(req))
ctx.SetContextValue(context.WebContextKey, ctx) // FIXME: this should be removed because NewWebContext should already set it
ctx.Data.MergeFrom(middleware.CommonTemplateContextData())
ctx.Data.MergeFrom(reqctx.ContextData{
"Title": ctx.Locale.Tr("install.install"),