Add status field to orders

This commit is contained in:
bronku 2025-03-18 22:30:16 +01:00
parent d4b76f6307
commit e55ca30d20
5 changed files with 17 additions and 12 deletions

View file

@ -73,6 +73,8 @@ func (h *handler) addOrder(w http.ResponseWriter, r *http.Request) {
return
}
n.Status = strings.TrimSpace(r.FormValue("status"))
n.Paid, err = strconv.Atoi(r.FormValue("paid"))
if err != nil {
w.WriteHeader(http.StatusBadRequest)