Save new cake and fix navigation links
This commit is contained in:
parent
2857507fae
commit
d70144c39a
3 changed files with 3 additions and 3 deletions
|
|
@ -28,7 +28,7 @@ func (h *Server) postCake(r *http.Request) (any, int, error) {
|
|||
}
|
||||
n.Category = r.FormValue("category")
|
||||
n.Availability = r.FormValue("availibility")
|
||||
fmt.Println(n)
|
||||
n.ID, err = h.s.SaveCake(n)
|
||||
return n, http.StatusAccepted, err
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<h1>New Order</h1>
|
||||
</header>
|
||||
<nav>
|
||||
<a href="/">back</a>
|
||||
<a href="/cakes">back</a>
|
||||
</nav>
|
||||
<main>
|
||||
<form method="post">
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<h1>Kill me please</h1>
|
||||
</header>
|
||||
<nav>
|
||||
<a href="order">New</a>
|
||||
<a href="/">orders</a>
|
||||
<a href="cakes">Manage Cakes</a>
|
||||
</nav>
|
||||
<main>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue