diff --git a/server.go b/server.go index a4d67db..78c1044 100644 --- a/server.go +++ b/server.go @@ -18,9 +18,9 @@ const ROOT_URL = "/climate" func startServer() { port := "8001" router := mux.NewRouter() - router.HandleFunc("/", showCharts).Methods("GET") - router.HandleFunc("/", showCharts).Methods("GET").Queries("show-minutes", "{[0-9]+}") - router.HandleFunc("/", saveSnapshot).Methods("POST") + router.HandleFunc("", showCharts).Methods("GET") + router.HandleFunc("", showCharts).Methods("GET").Queries("show-minutes", "{[0-9]+}") + router.HandleFunc("", saveSnapshot).Methods("POST") router.HandleFunc("/data", sendData).Methods("GET") router.HandleFunc("/data", sendData).Methods("GET").Queries("since", "") router.HandleFunc("/data/now", createAndSendSnapshot).Methods("GET")