(w http.ResponseWriter, r *http.Request)
| 274 | } |
| 275 | |
| 276 | func (b *WebBridge) handleHistory(w http.ResponseWriter, r *http.Request) { |
| 277 | agentID := r.URL.Query().Get("agent_id") |
| 278 | |
| 279 | var msgType MessageType |
| 280 | if r.Method == http.MethodDelete { |
| 281 | msgType = MsgTypeClearHistory |
| 282 | } else { |
| 283 | msgType = MsgTypeGetHistory |
| 284 | } |
| 285 | |
| 286 | resp, _ := b.handler(&FrontendMessage{ |
| 287 | ID: generateID(), |
| 288 | Type: msgType, |
| 289 | AgentID: agentID, |
| 290 | }) |
| 291 | |
| 292 | writeJSON(w, http.StatusOK, resp) |
| 293 | } |
| 294 | |
| 295 | func (b *WebBridge) handleConfig(w http.ResponseWriter, r *http.Request) { |
| 296 | switch r.Method { |
nothing calls this directly
no test coverage detected