aboutsummaryrefslogtreecommitdiff
path: root/cmd/web/handlers/routes.go
diff options
context:
space:
mode:
authorSamuel Johnson <[email protected]>2025-05-03 15:12:04 -0400
committerSamuel Johnson <[email protected]>2025-05-03 15:12:04 -0400
commit005a588111e6d27b012bc923c39d97a6129f39f2 (patch)
tree69b2bf16a07bd6ebf97313e9bb9056c57d8bb88c /cmd/web/handlers/routes.go
parent46cdc7254109aaebf6e8b629cbd8ecb46c7ad21b (diff)
Implement basic parser endpoint
Diffstat (limited to 'cmd/web/handlers/routes.go')
-rw-r--r--cmd/web/handlers/routes.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd/web/handlers/routes.go b/cmd/web/handlers/routes.go
index 5a57440..5c927c4 100644
--- a/cmd/web/handlers/routes.go
+++ b/cmd/web/handlers/routes.go
@@ -2,13 +2,17 @@ package handlers
import (
"github.com/gorilla/mux"
+ "paterissa.net/mblog/cmd/web/types"
)
-func RegisterEndpoints(webmaster string) *mux.Router {
- ctx := HandlerContext{webmaster}
+func RegisterEndpoints(app types.Application) *mux.Router {
+ ctx := blogContext{
+ err: app.Err,
+ Name: app.Env.Webmaster,
+ }
blogRouter := mux.NewRouter()
- blogRouter.HandleFunc("/", ctx.blogIndex)
+ blogRouter.HandleFunc("/", ctx.index)
return blogRouter
}