Add order total calculation and update template display
This commit is contained in:
parent
5af6e871c2
commit
fe703a9b1c
5 changed files with 22 additions and 4 deletions
|
|
@ -20,7 +20,8 @@ func (h *Server) loadHandler() {
|
|||
mux := http.NewServeMux()
|
||||
|
||||
mux.HandleFunc("GET /order/", h.render(h.order, "order.html"))
|
||||
mux.HandleFunc("GET /", h.render(h.index, "index.html"))
|
||||
mux.HandleFunc("GET /", h.redirect("/orders", http.StatusSeeOther))
|
||||
mux.HandleFunc("GET /orders", h.render(h.orders, "index.html"))
|
||||
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"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue