fixed grpc registration

This commit is contained in:
afeiszli 2021-06-01 16:23:37 +00:00
parent 21b2af1eed
commit 742f019f9b

View file

@ -1,8 +1,6 @@
package controller
import (
"log"
"github.com/davecgh/go-spew/spew"
"github.com/gravitl/netmaker/models"
"github.com/gravitl/netmaker/functions"
"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) {
log.Println("5")
// Set header
w.Header().Set("Content-Type", "application/json")
// get params
scfg := servercfg.GetConfig()
spew.Dump(scfg)
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(scfg)
}