aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/handlers/routes.go
diff options
context:
space:
mode:
authorSamuel Johnson <[email protected]>2025-11-24 00:38:12 -0500
committerSamuel Johnson <[email protected]>2025-11-24 00:38:12 -0500
commit177663c73f3d708120b975a74eebd0951177a53b (patch)
tree9629bfced318c645496a31cc7844c7840605113c /cmd/web/handlers/routes.go
parent1692aea0951f1d46af01211bd3e32920c443505f (diff)
Add blog posts to front page
Diffstat (limited to 'cmd/web/handlers/routes.go')
-rw-r--r--cmd/web/handlers/routes.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/web/handlers/routes.go b/cmd/web/handlers/routes.go
index 91c27a2..e9fd0f5 100644
--- a/cmd/web/handlers/routes.go
+++ b/cmd/web/handlers/routes.go
@@ -1,13 +1,16 @@
package handlers
import (
+ "database/sql"
"net/http"
+
"paterissa.net/mblog/cmd/web/types"
)
-func RegisterEndpoints(app types.Application) *http.ServeMux {
+func RegisterEndpoints(app types.Application, db *sql.DB) *http.ServeMux {
blog := blogContext{
err: app.Err,
+ db: db,
Name: app.Env.Webmaster,
}
audio := fsContext{