Add missing return on not found for edit product

This commit is contained in:
jordi fita mas 2023-05-05 10:54:40 +02:00
parent 251080cbe5
commit 73497eb051
1 changed files with 1 additions and 0 deletions

View File

@ -144,6 +144,7 @@ func HandleUpdateProduct(w http.ResponseWriter, r *http.Request, params httprout
taxes := mustSliceAtoi(form.Tax.Selected)
if ok := conn.MustGetBool(r.Context(), "select edit_product($1, $2, $3, $4, $5, $6)", slug, form.Name, form.Description, form.Price, taxes, form.Tags); !ok {
http.NotFound(w, r)
return
}
htmxRedirect(w, r, companyURI(company, "/products"))
}