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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user