From bf0ad86df2e64191f6c430c328fee211ac3affa7 Mon Sep 17 00:00:00 2001 From: xengineering Date: Mon, 12 Feb 2024 20:33:24 +0100 Subject: view: Implement GET handler for model.Recipe --- main.go | 1 + 1 file changed, 1 insertion(+) (limited to 'main.go') diff --git a/main.go b/main.go index cbf1593..c7a6871 100644 --- a/main.go +++ b/main.go @@ -44,6 +44,7 @@ func startServer(addr string) *http.Server { r.PathPrefix("/static/"). Handler(http.StripPrefix("/static/", http.FileServer(http.FS(static)))) r.HandleFunc("/recipes", view.Recipes).Methods(`GET`) + r.HandleFunc("/recipe/{id:[0-9]+}", view.Recipe).Methods(`GET`) muxer := http.NewServeMux() muxer.Handle("/", r) -- cgit v1.2.3-70-g09d2