deleteConfig deletes a configuration.
(w http.ResponseWriter, req *http.Request)
| 460 | |
| 461 | // deleteConfig deletes a configuration. |
| 462 | func (ui *webInterface) deleteConfig(w http.ResponseWriter, req *http.Request) { |
| 463 | name := req.URL.Query().Get("config") |
| 464 | if err := removeConfig(ui.settingsFile, name); err != nil { |
| 465 | http.Error(w, err.Error(), http.StatusBadRequest) |
| 466 | ui.options.UI.PrintErr(err) |
| 467 | return |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | // getFromLegend returns the suffix of an entry in legend that starts |
| 472 | // with param. It returns def if no such entry is found. |
nothing calls this directly
no test coverage detected