fix&refact: validation response in create about detail
This commit is contained in:
parent
550f56e27c
commit
5b008fd41e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue