From 73497eb051a71edbf15694d7e39442627982989c Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Fri, 5 May 2023 10:54:40 +0200 Subject: [PATCH] Add missing return on not found for edit product --- pkg/products.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/products.go b/pkg/products.go index 500f65b..9b990a1 100644 --- a/pkg/products.go +++ b/pkg/products.go @@ -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")) }