(w http.ResponseWriter, r *http.Request)
| 147 | } |
| 148 | |
| 149 | func (mod *RestAPI) showHID(w http.ResponseWriter, r *http.Request) { |
| 150 | params := mux.Vars(r) |
| 151 | mac := strings.ToLower(params["mac"]) |
| 152 | |
| 153 | if mac == "" { |
| 154 | mod.toJSON(w, mod.Session.HID) |
| 155 | } else if dev, found := mod.Session.HID.Get(mac); found { |
| 156 | mod.toJSON(w, dev) |
| 157 | } else { |
| 158 | http.Error(w, "Not Found", 404) |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | func (mod *RestAPI) showEnv(w http.ResponseWriter, r *http.Request) { |
| 163 | mod.toJSON(w, mod.Session.Env) |
no test coverage detected