|
@@ -1,8 +1,6 @@
|
|
package controller
|
|
package controller
|
|
|
|
|
|
import (
|
|
import (
|
|
- "log"
|
|
|
|
- "github.com/davecgh/go-spew/spew"
|
|
|
|
"github.com/gravitl/netmaker/models"
|
|
"github.com/gravitl/netmaker/models"
|
|
"github.com/gravitl/netmaker/functions"
|
|
"github.com/gravitl/netmaker/functions"
|
|
"github.com/gravitl/netmaker/serverctl"
|
|
"github.com/gravitl/netmaker/serverctl"
|
|
@@ -81,14 +79,12 @@ func removeNetwork(w http.ResponseWriter, r *http.Request) {
|
|
}
|
|
}
|
|
|
|
|
|
func getConfig(w http.ResponseWriter, r *http.Request) {
|
|
func getConfig(w http.ResponseWriter, r *http.Request) {
|
|
- log.Println("5")
|
|
|
|
// Set header
|
|
// Set header
|
|
w.Header().Set("Content-Type", "application/json")
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
|
|
// get params
|
|
// get params
|
|
|
|
|
|
scfg := servercfg.GetConfig()
|
|
scfg := servercfg.GetConfig()
|
|
- spew.Dump(scfg)
|
|
|
|
w.WriteHeader(http.StatusOK)
|
|
w.WriteHeader(http.StatusOK)
|
|
json.NewEncoder(w).Encode(scfg)
|
|
json.NewEncoder(w).Encode(scfg)
|
|
}
|
|
}
|