From d3e81c47f68d4096f8d258bc50ae2b29404dd3a4 Mon Sep 17 00:00:00 2001 From: Eugene Bujak Date: Fri, 1 Feb 2019 18:52:56 +0300 Subject: [PATCH] rename /install/ path names to be more fitting --- control.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/control.go b/control.go index 66ea1a27..0c8bd487 100644 --- a/control.go +++ b/control.go @@ -708,7 +708,7 @@ type firstRunData struct { Interfaces map[string]interface{} `json:"interfaces"` } -func handleGetDefaultAddresses(w http.ResponseWriter, r *http.Request) { +func handleInstallGetAddresses(w http.ResponseWriter, r *http.Request) { data := firstRunData{} ifaces, err := getValidNetInterfaces() if err != nil { @@ -755,7 +755,7 @@ func handleGetDefaultAddresses(w http.ResponseWriter, r *http.Request) { } } -func handleSetAllSettings(w http.ResponseWriter, r *http.Request) { +func handleInstallConfigure(w http.ResponseWriter, r *http.Request) { newSettings := firstRunData{} err := json.NewDecoder(r.Body).Decode(&newSettings) if err != nil { @@ -816,6 +816,6 @@ func registerControlHandlers() { http.HandleFunc("/control/dhcp/find_active_dhcp", postInstall(optionalAuth(ensurePOST(handleDHCPFindActiveServer)))) // TODO: move to registerInstallHandlers() - http.HandleFunc("/control/install/get_default_addresses", preInstall(ensureGET(handleGetDefaultAddresses))) - http.HandleFunc("/control/install/set_all_settings", preInstall(ensurePOST(handleSetAllSettings))) + http.HandleFunc("/control/install/get_addresses", preInstall(ensureGET(handleInstallGetAddresses))) + http.HandleFunc("/control/install/configure", preInstall(ensurePOST(handleInstallConfigure))) }