mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-05-17 03:53:10 +00:00
refactor(web): pass render URL state explicitly
Signed-off-by: Jason Cameron <jason.cameron@stanwith.me>
This commit is contained in:
+2
-4
@@ -160,11 +160,9 @@ func New(opts Options) (*Server, error) {
|
||||
if opts.Policy.Impressum != nil {
|
||||
registerWithPrefix(anubis.APIPrefix+"imprint", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
handler := templ.Handler(
|
||||
web.Base(opts.Policy.Impressum.Page.Title, opts.Policy.Impressum.Page, opts.Policy.Impressum, localization.GetLocalizer(r)),
|
||||
web.BaseWithOptions(result.renderOptions(), opts.Policy.Impressum.Page.Title, opts.Policy.Impressum.Page, opts.Policy.Impressum, localization.GetLocalizer(r)),
|
||||
)
|
||||
result.withAnubisBasePrefix(func() {
|
||||
handler.ServeHTTP(w, r)
|
||||
})
|
||||
handler.ServeHTTP(w, r)
|
||||
}), "GET")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user