Almost there

This commit is contained in:
Daniel Ledda
2020-11-14 15:16:50 +01:00
parent 6c3559a89c
commit 59e6bf85f0

View File

@@ -17,7 +17,7 @@ const ROOT_URL = "/climate"
func startServer() {
port := "8001"
router := mux.NewRouter()
router := mux.NewRouter().StrictSlash(true)
router.HandleFunc("", showCharts).Methods("GET")
router.HandleFunc("", showCharts).Methods("GET").Queries("show-minutes", "{[0-9]+}")
router.HandleFunc("", saveSnapshot).Methods("POST")