From b2447bc967df37b31282a97e32c581954bb8bcc9 Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Thu, 17 Oct 2024 16:37:23 +0200 Subject: Move from html/template to templ --- pages/pages.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'pages/pages.go') diff --git a/pages/pages.go b/pages/pages.go index e965bdd..eb7a3f6 100644 --- a/pages/pages.go +++ b/pages/pages.go @@ -5,22 +5,22 @@ import ( ) func Init() Page { - return simple("index", func(r *http.Request, uid int32) any { + return simple(index, func(r *http.Request, uid int32) string { u, _ := Q.GetUserById(r.Context(), uid) return u.Name }) } func Recur() Page { - return simpleByQuery("recur", Q.GetRecurExpenses) + return simpleByQuery(recur, Q.GetRecurExpenses) } func Categories() Page { - return simpleByQuery("categories", Q.GetCategoriesOrdered) + return simpleByQuery(categories, Q.GetCategoriesOrdered) } func NotFound() http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { - showTemplate(w, "404", r.RequestURI) + render(notfound(r.RequestURI), w, r) } } -- cgit v1.2.3-70-g09d2