Update backend

This commit is contained in:
aditya.siregar
2024-08-18 12:39:23 +07:00
parent 6a8541faa0
commit c41485041c
7 changed files with 114 additions and 20 deletions
@@ -42,9 +42,8 @@ func (h *Handler) Inquiry(c *gin.Context) {
return
}
validate := validator.New()
if err := validate.Struct(req); err != nil {
response.ErrorWrapper(c, err)
if err := request.ValidateAndHandleError(req); err != nil {
response.ErrorWrapper(c, errors.NewErrorMessage(errors.ErrorBadRequest, err.Error()))
return
}