feat/prescription: finalize Prescription

This commit is contained in:
2025-11-14 08:40:17 +07:00
parent 9d26054e1b
commit ae2ca4b115
5 changed files with 81 additions and 1 deletions
@@ -78,6 +78,18 @@ func (obj myBase) Delete(w http.ResponseWriter, r *http.Request) {
rw.DataResponse(w, res, err)
}
func (obj myBase) Submit(w http.ResponseWriter, r *http.Request) {
id := rw.ValidateInt(w, "id", r.PathValue("id"))
if id <= 0 {
return
}
dto := e.ReadDetailDto{}
dto.Id = uint(id)
res, err := u.Submit(dto)
rw.DataResponse(w, res, err)
}
func (obj myBase) Approve(w http.ResponseWriter, r *http.Request) {
id := rw.ValidateInt(w, "id", r.PathValue("id"))
if id <= 0 {