(w http.ResponseWriter, r *http.Request)
| 201 | } |
| 202 | |
| 203 | func (mod *RestAPI) showWiFi(w http.ResponseWriter, r *http.Request) { |
| 204 | params := mux.Vars(r) |
| 205 | mac := strings.ToLower(params["mac"]) |
| 206 | |
| 207 | if mac == "" { |
| 208 | mod.toJSON(w, mod.Session.WiFi) |
| 209 | } else if station, found := mod.Session.WiFi.Get(mac); found { |
| 210 | mod.toJSON(w, station) |
| 211 | } else if client, found := mod.Session.WiFi.GetClient(mac); found { |
| 212 | mod.toJSON(w, client) |
| 213 | } else { |
| 214 | http.Error(w, "Not Found", 404) |
| 215 | } |
| 216 | } |
| 217 | |
| 218 | func (mod *RestAPI) runSessionCommand(w http.ResponseWriter, r *http.Request) { |
| 219 | var err error |
no test coverage detected