refactor (doctor,nurse,specialist-intern): done
This commit is contained in:
@@ -33,7 +33,7 @@ func (obj myBase) GetList(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (obj myBase) GetDetail(w http.ResponseWriter, r *http.Request) {
|
||||
id := rw.ValidateInt(w, "id", r.PathValue("id"))
|
||||
id := rw.ValidateInt(w, "code", r.PathValue("code"))
|
||||
if id <= 0 {
|
||||
return
|
||||
}
|
||||
@@ -44,7 +44,7 @@ func (obj myBase) GetDetail(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (obj myBase) Update(w http.ResponseWriter, r *http.Request) {
|
||||
id := rw.ValidateInt(w, "id", r.PathValue("id"))
|
||||
id := rw.ValidateInt(w, "code", r.PathValue("code"))
|
||||
if id <= 0 {
|
||||
return
|
||||
}
|
||||
@@ -59,7 +59,7 @@ func (obj myBase) Update(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (obj myBase) Delete(w http.ResponseWriter, r *http.Request) {
|
||||
id := rw.ValidateInt(w, "id", r.PathValue("id"))
|
||||
id := rw.ValidateInt(w, "code", r.PathValue("code"))
|
||||
if id <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -35,9 +35,8 @@ import (
|
||||
soapi "simrs-vx/internal/interface/main-handler/soapi"
|
||||
|
||||
/******************** actor ********************/
|
||||
doctor "simrs-vx/internal/interface/main-handler/doctor"
|
||||
|
||||
employee "simrs-vx/internal/interface/main-handler/employee"
|
||||
nurse "simrs-vx/internal/interface/main-handler/nurse"
|
||||
nutritionist "simrs-vx/internal/interface/main-handler/nutritionist"
|
||||
patient "simrs-vx/internal/interface/main-handler/patient"
|
||||
person "simrs-vx/internal/interface/main-handler/person"
|
||||
@@ -268,8 +267,6 @@ func SetRoutes() http.Handler {
|
||||
hc.RegCrud(r, "/v1/person-contact", personcontact.O)
|
||||
hc.RegCrud(r, "/v1/person-insurance", personinsurance.O)
|
||||
hc.RegCrud(r, "/v1/employee", employee.O)
|
||||
hc.RegCrud(r, "/v1/doctor", doctor.O)
|
||||
hc.RegCrud(r, "/v1/nurse", nurse.O)
|
||||
hc.RegCrud(r, "/v1/nutritionist", nutritionist.O)
|
||||
hc.RegCrud(r, "/v1/pharmacist", pharmacist.O)
|
||||
hk.GroupRoutes("/v1/user", r, hk.MapHandlerFunc{
|
||||
|
||||
@@ -33,7 +33,7 @@ func (obj myBase) GetList(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (obj myBase) GetDetail(w http.ResponseWriter, r *http.Request) {
|
||||
id := rw.ValidateInt(w, "id", r.PathValue("id"))
|
||||
id := rw.ValidateInt(w, "code", r.PathValue("code"))
|
||||
if id <= 0 {
|
||||
return
|
||||
}
|
||||
@@ -44,7 +44,7 @@ func (obj myBase) GetDetail(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (obj myBase) Update(w http.ResponseWriter, r *http.Request) {
|
||||
id := rw.ValidateInt(w, "id", r.PathValue("id"))
|
||||
id := rw.ValidateInt(w, "code", r.PathValue("code"))
|
||||
if id <= 0 {
|
||||
return
|
||||
}
|
||||
@@ -59,7 +59,7 @@ func (obj myBase) Update(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (obj myBase) Delete(w http.ResponseWriter, r *http.Request) {
|
||||
id := rw.ValidateInt(w, "id", r.PathValue("id"))
|
||||
id := rw.ValidateInt(w, "code", r.PathValue("code"))
|
||||
if id <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user