fix&refact: validation response in create about detail

This commit is contained in:
pahmiudahgede 2025-05-15 11:28:06 +07:00
parent 550f56e27c
commit 5b008fd41e
1 changed files with 5 additions and 0 deletions

View File

@ -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)