From a1e63b868fc121683d6bedb81de54c0f20849b39 Mon Sep 17 00:00:00 2001 From: Kharec Date: Sat, 10 Jan 2026 22:41:43 +0100 Subject: [PATCH] refactor: remove redundant validation and unused import --- internal/handlers/post_handler.go | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/internal/handlers/post_handler.go b/internal/handlers/post_handler.go index 7f37914..5bdf835 100644 --- a/internal/handlers/post_handler.go +++ b/internal/handlers/post_handler.go @@ -12,7 +12,6 @@ import ( "goyco/internal/repositories" "goyco/internal/security" "goyco/internal/services" - "goyco/internal/validation" "github.com/go-chi/chi/v5" "github.com/jackc/pgconn" @@ -273,16 +272,6 @@ func (h *PostHandler) UpdatePost(w http.ResponseWriter, r *http.Request) { title := security.SanitizeInput(req.Title) content := security.SanitizePostContent(req.Content) - if err := validation.ValidateTitle(title); err != nil { - SendErrorResponse(w, err.Error(), http.StatusBadRequest) - return - } - - if err := validation.ValidateContent(content); err != nil { - SendErrorResponse(w, err.Error(), http.StatusBadRequest) - return - } - post.Title = title post.Content = content