diff options
| author | xengineering <me@xengineering.eu> | 2024-02-17 17:51:00 +0100 | 
|---|---|---|
| committer | xengineering <me@xengineering.eu> | 2024-03-03 14:00:10 +0100 | 
| commit | e105822a4f2227ca97853ac1bf106f8d204d6837 (patch) | |
| tree | c41dad467fe04b645543644a4bd6f5c86b77f232 /main.go | |
| parent | 55b69380ebd704477c4a37ff9b70fcb3cbdc63e5 (diff) | |
| download | ceres-e105822a4f2227ca97853ac1bf106f8d204d6837.tar ceres-e105822a4f2227ca97853ac1bf106f8d204d6837.tar.zst ceres-e105822a4f2227ca97853ac1bf106f8d204d6837.zip | |
controller: Update recipe based on JSON
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 2 | 
1 files changed, 2 insertions, 0 deletions
| @@ -11,6 +11,7 @@ import (  	"xengineering.eu/ceres/model"  	"xengineering.eu/ceres/view" +	"xengineering.eu/ceres/controller"  	"github.com/gorilla/mux"  ) @@ -45,6 +46,7 @@ func startServer(addr string) *http.Server {  		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`) +	r.HandleFunc("/recipe", controller.Recipe).Methods(`POST`)  	r.HandleFunc("/favicon.ico", view.Favicon).Methods(`GET`)  	r.HandleFunc("/", view.Index).Methods(`GET`) | 
