removed unused api endpoints

This commit is contained in:
aishwarya-raimule
2023-01-23 14:25:30 +05:30
parent 3a7f7e1dfe
commit 4269298463

View File

@@ -33,16 +33,9 @@ func NewServer(port string, corsList string) (*Server, error) {
}
router := mux.NewRouter()
router.HandleFunc("/events", eventsHandler).Methods("POST")
router.HandleFunc("/events/json", eventsHandlerJson).Methods("POST")
router.HandleFunc("/health", healthHandler).Methods("GET")
router.HandleFunc("/health/toggle", healthToggleHandler).Methods("GET")
router.HandleFunc("/schema/get", getSchemaHandler).Methods("GET")
router.HandleFunc("/schema/refresh", refreshSchemaHandler).Methods("POST")
router.HandleFunc("/schema/add", addSchemaHandler).Methods("POST")
//router.Path("/metrics").Handler(promhttp.Handler())
// router.HandleFunc("/test", testHandler).Methods("GET")
// router.HandleFunc("/stop", stopHandler).Methods("POST")
httpServer := &http.Server{Addr: ":" + port, Handler: enableCors(router, corsList)}
newServer := &Server{HttpServer: httpServer, Listener: listener}