Merge branch 'dev' of github.com:dikstub-rssa/simrs-be into migration

This commit is contained in:
dpurbosakti
2025-12-09 12:47:44 +07:00
44 changed files with 2462 additions and 256 deletions
@@ -59,6 +59,11 @@ func (obj myBase) Update(w http.ResponseWriter, r *http.Request) {
return
}
authInfo, err := pa.GetAuthInfo(r)
if err != nil {
rw.WriteJSON(w, http.StatusUnauthorized, d.IS{"message": err.Error()}, nil)
}
dto := e.UpdateDto{}
if res := rw.ValidateStructByIOR(w, r.Body, &dto); !res {
return
@@ -71,7 +76,6 @@ func (obj myBase) Update(w http.ResponseWriter, r *http.Request) {
dto.Id = uint(id)
dto.AuthInfo = *authInfo
res, err := u.Update(dto)
rw.DataResponse(w, res, err)
}