|
@@ -21,6 +21,10 @@ import (
|
|
|
|
|
|
func serverHandlers(r *mux.Router) {
|
|
|
// r.HandleFunc("/api/server/addnetwork/{network}", securityCheckServer(true, http.HandlerFunc(addNetwork))).Methods("POST")
|
|
|
+ r.HandleFunc("/api/server/health", http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) {
|
|
|
+ resp.WriteHeader(http.StatusOK)
|
|
|
+ resp.Write([]byte("Server is up and running!!"))
|
|
|
+ }))
|
|
|
r.HandleFunc("/api/server/getconfig", securityCheckServer(false, http.HandlerFunc(getConfig))).Methods("GET")
|
|
|
r.HandleFunc("/api/server/removenetwork/{network}", securityCheckServer(true, http.HandlerFunc(removeNetwork))).Methods("DELETE")
|
|
|
r.HandleFunc("/api/server/register", authorize(true, false, "node", http.HandlerFunc(register))).Methods("POST")
|