diff options
author | Samuel Johnson <[email protected]> | 2025-05-03 15:12:04 -0400 |
---|---|---|
committer | Samuel Johnson <[email protected]> | 2025-05-03 15:12:04 -0400 |
commit | 005a588111e6d27b012bc923c39d97a6129f39f2 (patch) | |
tree | 69b2bf16a07bd6ebf97313e9bb9056c57d8bb88c /cmd/web/handlers/routes.go | |
parent | 46cdc7254109aaebf6e8b629cbd8ecb46c7ad21b (diff) |
Implement basic parser endpoint
Diffstat (limited to 'cmd/web/handlers/routes.go')
-rw-r--r-- | cmd/web/handlers/routes.go | 10 |
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 } |