(w http.ResponseWriter, r *http.Request)
| 134 | } |
| 135 | |
| 136 | func (mod *RestAPI) showBLE(w http.ResponseWriter, r *http.Request) { |
| 137 | params := mux.Vars(r) |
| 138 | mac := strings.ToLower(params["mac"]) |
| 139 | |
| 140 | if mac == "" { |
| 141 | mod.toJSON(w, mod.Session.BLE) |
| 142 | } else if dev, found := mod.Session.BLE.Get(mac); found { |
| 143 | mod.toJSON(w, dev) |
| 144 | } else { |
| 145 | http.Error(w, "Not Found", 404) |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | func (mod *RestAPI) showHID(w http.ResponseWriter, r *http.Request) { |
| 150 | params := mux.Vars(r) |
no test coverage detected