From 5b008fd41e876e85e6de4ca310c3618db91c2273 Mon Sep 17 00:00:00 2001 From: pahmiudahgede Date: Thu, 15 May 2025 11:28:06 +0700 Subject: [PATCH] fix&refact: validation response in create about detail --- internal/handler/about_handler.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/handler/about_handler.go b/internal/handler/about_handler.go index ca4f581..ebe895b 100644 --- a/internal/handler/about_handler.go +++ b/internal/handler/about_handler.go @@ -119,6 +119,11 @@ func (h *AboutHandler) CreateAboutDetail(c *fiber.Ctx) error { return utils.ErrorResponse(c, "Invalid input data") } + errors, valid := request.ValidateAboutDetail() + if !valid { + return utils.ValidationErrorResponse(c, errors) + } + aboutDetailImage, err := c.FormFile("image_detail") if err != nil { log.Printf("Error retrieving image detail from request: %v", err)