renamed cake editor

This commit is contained in:
Bronku 2025-01-31 20:12:26 +01:00
parent 331f3080f9
commit 353dffdd82
4 changed files with 4 additions and 4 deletions

View file

@ -17,12 +17,13 @@ func (c *controller) cakeOptions(w http.ResponseWriter, r *http.Request) {
c.tmpl[template].Execute(w, struct{ Cakes []cake }{Cakes: []cake{{"Hello", 1}, {"World", 2}}})
}
func (c *controller) editCakes(w http.ResponseWriter, r *http.Request) {
func (c *controller) cakeEditor(w http.ResponseWriter, r *http.Request) {
type cake struct {
Name string
ID int
Price int
}
w.Header().Set("Content-Type", "text/html")
c.tmpl["cake_editor"].Execute(w, cake{"Hello", 1, 120})
}