From 6c3559a89ccbab9af85184166051c0bb1b4b977b Mon Sep 17 00:00:00 2001 From: Daniel Ledda Date: Sat, 14 Nov 2020 15:10:55 +0100 Subject: [PATCH] Almost there --- server.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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")