summaryrefslogtreecommitdiff
path: root/pages/pages.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2024-10-17 16:37:23 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2024-10-17 16:37:23 +0200
commitb2447bc967df37b31282a97e32c581954bb8bcc9 (patch)
tree39758d1121fae6dc1d27e8a45035690421900d6c /pages/pages.go
parent789d21034e526a03d3e91d5d284a4888be938340 (diff)
downloadgosten-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.go8
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)
}
}