From 70031d8971136583647125d967ace7b9c831ed00 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 17 Oct 2024 18:07:11 +0200 Subject: Save User as part of the context --- pages/pages.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'pages/pages.go') diff --git a/pages/pages.go b/pages/pages.go index eb7a3f6..0f03cdd 100644 --- a/pages/pages.go +++ b/pages/pages.go @@ -5,10 +5,7 @@ import ( ) func Init() Page { - return simple(index, func(r *http.Request, uid int32) string { - u, _ := Q.GetUserById(r.Context(), uid) - return u.Name - }) + return simple(index()) } func Recur() Page { @@ -20,7 +17,5 @@ func Categories() Page { } func NotFound() http.HandlerFunc { - return func(w http.ResponseWriter, r *http.Request) { - render(notfound(r.RequestURI), w, r) - } + return render(notfound()) } -- cgit v1.2.3-70-g09d2