saveConfig saves URL configuration.
(w http.ResponseWriter, req *http.Request)
| 451 | |
| 452 | // saveConfig saves URL configuration. |
| 453 | func (ui *webInterface) saveConfig(w http.ResponseWriter, req *http.Request) { |
| 454 | if err := setConfig(ui.settingsFile, *req.URL); err != nil { |
| 455 | http.Error(w, err.Error(), http.StatusBadRequest) |
| 456 | ui.options.UI.PrintErr(err) |
| 457 | return |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | // deleteConfig deletes a configuration. |
| 462 | func (ui *webInterface) deleteConfig(w http.ResponseWriter, req *http.Request) { |