Browse Source

fix(ui): render edit template on category update validation error

Frédéric Guillot 6 days ago
parent
commit
96989e2a6f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      internal/ui/category_update.go

+ 1 - 1
internal/ui/category_update.go

@@ -52,7 +52,7 @@ func (h *handler) updateCategory(w http.ResponseWriter, r *http.Request) {
 
 	if validationErr := validator.ValidateCategoryModification(h.store, user.ID, category.ID, categoryRequest); validationErr != nil {
 		view.Set("errorMessage", validationErr.Translate(user.Language))
-		response.HTML(w, r, view.Render("create_category"))
+		response.HTML(w, r, view.Render("edit_category"))
 		return
 	}