(w http.ResponseWriter, r *http.Request)
| 176 | } |
| 177 | |
| 178 | func (mod *RestAPI) showLAN(w http.ResponseWriter, r *http.Request) { |
| 179 | params := mux.Vars(r) |
| 180 | mac := strings.ToLower(params["mac"]) |
| 181 | |
| 182 | if mac == "" { |
| 183 | mod.toJSON(w, mod.Session.Lan) |
| 184 | } else if host, found := mod.Session.Lan.Get(mac); found { |
| 185 | mod.toJSON(w, host) |
| 186 | } else { |
| 187 | http.Error(w, "Not Found", 404) |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | func (mod *RestAPI) showOptions(w http.ResponseWriter, r *http.Request) { |
| 192 | mod.toJSON(w, mod.Session.Options) |
no test coverage detected