diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2024-10-17 16:37:23 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2024-10-17 16:37:23 +0200 |
commit | b2447bc967df37b31282a97e32c581954bb8bcc9 (patch) | |
tree | 39758d1121fae6dc1d27e8a45035690421900d6c /pages/pages.go | |
parent | 789d21034e526a03d3e91d5d284a4888be938340 (diff) | |
download | gosten-b2447bc967df37b31282a97e32c581954bb8bcc9.tar.gz gosten-b2447bc967df37b31282a97e32c581954bb8bcc9.tar.bz2 gosten-b2447bc967df37b31282a97e32c581954bb8bcc9.zip |
Move from html/template to templ
Diffstat (limited to 'pages/pages.go')
-rw-r--r-- | pages/pages.go | 8 |
1 files changed, 4 insertions, 4 deletions
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) } } |