waiting for migration

This commit is contained in:
dpurbosakti
2025-09-17 16:35:07 +07:00
parent 8406c4f202
commit 5a5856ccb9
9 changed files with 123 additions and 52 deletions
@@ -72,9 +72,14 @@ func (obj myBase) Delete(w http.ResponseWriter, r *http.Request) {
func (obj myBase) CheckOut(w http.ResponseWriter, r *http.Request) {
dto := e.DischargeDto{}
id := rw.ValidateInt(w, "id", r.PathValue("id"))
if id <= 0 {
return
}
if res := rw.ValidateStructByIOR(w, r.Body, &dto); !res {
return
}
dto.Id = uint(id)
res, err := u.CheckOut(dto)
rw.DataResponse(w, res, err)
}
@@ -84,9 +84,6 @@ func (obj myBase) Complete(w http.ResponseWriter, r *http.Request) {
}
dto := e.ReadDetailDto{}
if res := rw.ValidateStructByIOR(w, r.Body, &dto); !res {
return
}
dto.AuthInfo = *authInfo
dto.Id = uint(id)
res, err := u.Complete(dto)