ripping out wg grpc stuff

This commit is contained in:
afeiszli
2021-08-09 17:34:13 -04:00
parent 6a91bed0bb
commit 70493754b2
14 changed files with 12 additions and 727 deletions

View File

@@ -14,7 +14,6 @@ import (
func serverHandlers(r *mux.Router) {
r.HandleFunc("/api/server/addnetwork/{network}", securityCheckServer(true, http.HandlerFunc(addNetwork))).Methods("POST")
r.HandleFunc("/api/server/getconfig", securityCheckServer(false, http.HandlerFunc(getConfig))).Methods("GET")
r.HandleFunc("/api/server/getwgconfig", securityCheckServer(true, http.HandlerFunc(getWGConfig))).Methods("GET")
r.HandleFunc("/api/server/removenetwork/{network}", securityCheckServer(true, http.HandlerFunc(removeNetwork))).Methods("DELETE")
}
@@ -91,17 +90,6 @@ func getConfig(w http.ResponseWriter, r *http.Request) {
json.NewEncoder(w).Encode(scfg)
}
func getWGConfig(w http.ResponseWriter, r *http.Request) {
// Set header
w.Header().Set("Content-Type", "application/json")
// get params
wgcfg := servercfg.GetWGConfig()
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(wgcfg)
}
/*
func getMongoConfig(w http.ResponseWriter, r *http.Request) {
// Set header