fix: add missing TemplateContext type definition

The type was used throughout services/context but never defined —
likely lost during upstream merge. It's a map[string]any that
implements context.Context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-05-16 17:56:31 -05:00
parent f707415bfa
commit 8e2e65f74a
+4
View File
@@ -17,6 +17,10 @@ import (
"code.gitea.io/gitea/services/webtheme"
)
// TemplateContext is a map that holds template rendering context data
// and implements context.Context for passing request-scoped values.
type TemplateContext map[string]any
var _ context.Context = TemplateContext(nil)
func NewTemplateContext(ctx context.Context, req *http.Request) TemplateContext {