aboutsummaryrefslogtreecommitdiffstats
path: root/routers/private/internal.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2025-02-12 14:25:46 +0800
committerGitHub <noreply@github.com>2025-02-12 14:25:46 +0800
commitf58f5bb3d8a92f30112d8914ed7006b72e28df05 (patch)
treed98327e00983123d28dc1298e9c1a8ec3e192a0a /routers/private/internal.go
parent06f10656369c7e4274ae4e9f9edb21e1cac520d9 (diff)
downloadgitea-f58f5bb3d8a92f30112d8914ed7006b72e28df05.tar.gz
gitea-f58f5bb3d8a92f30112d8914ed7006b72e28df05.zip
Avoid duplicate SetContextValue call (#33564)HEADmain
And fix FIXME and TODO
Diffstat (limited to 'routers/private/internal.go')
-rw-r--r--routers/private/internal.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/private/internal.go b/routers/private/internal.go
index 2232c1b78c..55a11aa3dd 100644
--- a/routers/private/internal.go
+++ b/routers/private/internal.go
@@ -87,7 +87,7 @@ func Routes() *web.Router {
// FIXME: it is not right to use context.Contexter here because all routes here should use PrivateContext
// Fortunately, the LFS handlers are able to handle requests without a complete web context
common.AddOwnerRepoGitLFSRoutes(r, func(ctx *context.PrivateContext) {
- webContext := &context.Context{Base: ctx.Base}
+ webContext := &context.Context{Base: ctx.Base} // see above, it shouldn't manually construct the web context
ctx.SetContextValue(context.WebContextKey, webContext) // FIXME: this is not ideal but no other way at the moment
})
})