Add POST endpoint for creating new cakes

This commit is contained in:
bronku 2025-03-26 14:42:48 +01:00
parent 01732b97fc
commit 2857507fae
3 changed files with 24 additions and 1 deletions

View file

@ -27,6 +27,7 @@ func (h *Server) loadHandler() {
mux.HandleFunc("POST /order/", h.render(h.postOrder, "confirmation.html"))
mux.HandleFunc("GET /cakes", h.render(h.cakes, "cakes.html"))
mux.HandleFunc("GET /cake/", h.render(h.cake, "cake.html"))
mux.HandleFunc("POST /cake/", h.render(h.postCake, "confirmation.html"))
h.Handler = mux
}