summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-01-17 20:56:33 +0100
committerxengineering <me@xengineering.eu>2024-01-17 21:03:36 +0100
commit34fa1017a697287540d92d8c36ecca988f936f16 (patch)
tree53d28064e51310c1d4e0a2617f35a81f24906498 /main.go
parent644ddcde14c0545dd667eaf096dadab518ad90a7 (diff)
downloadceres-34fa1017a697287540d92d8c36ecca988f936f16.tar
ceres-34fa1017a697287540d92d8c36ecca988f936f16.tar.zst
ceres-34fa1017a697287540d92d8c36ecca988f936f16.zip
Add recipe step view
This is the next increment to implement recipe steps.
Diffstat (limited to 'main.go')
-rw-r--r--main.go3
1 files changed, 3 insertions, 0 deletions
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()