From 34fa1017a697287540d92d8c36ecca988f936f16 Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 17 Jan 2024 20:56:33 +0100 Subject: Add recipe step view This is the next increment to implement recipe steps. --- main.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'main.go') diff --git a/main.go b/main.go index a546d86..29564ff 100644 --- a/main.go +++ b/main.go @@ -49,6 +49,9 @@ func startServer(addr string) *http.Server { r.HandleFunc("/recipes/{id}/edit", view.RecipeEditHandler).Methods(`GET`) r.HandleFunc("/recipes/{id}", controller.RecipePost).Methods(`POST`) + r.HandleFunc("/recipes/{id}/steps/{step_id}", + view.HandlerHTML(&model.RecipeStep{})).Methods(`GET`) + r.HandleFunc("/", view.HandlerHTML(&model.Index{})).Methods(`GET`) muxer := http.NewServeMux() -- cgit v1.2.3-70-g09d2