adjustment encounter

This commit is contained in:
vanilia
2025-11-04 10:26:11 +07:00
parent e88f891d03
commit 8a3a140cde
8 changed files with 403 additions and 67 deletions
@@ -26,10 +26,15 @@ func (obj myBase) Create(w http.ResponseWriter, r *http.Request) {
if err != nil {
rw.WriteJSON(w, http.StatusUnauthorized, d.IS{"message": err.Error()}, nil)
}
dto := e.CreateDto{}
if res := rw.ValidateStructByIOR(w, r.Body, &dto); !res {
return
}
if valid := validateRequestCreate(w, dto); !valid {
return
}
dto.AuthInfo = *authInfo
res, err := u.Create(dto)
rw.DataResponse(w, res, err)