From ba1a94b85d01a6e123ef9895bc89b327a96672cb Mon Sep 17 00:00:00 2001 From: Daniel Ledda Date: Sat, 7 Nov 2020 01:33:10 +0100 Subject: [PATCH] Changed endpoints and db queries, chart now shows suggested mins and maxes --- climate-server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/climate-server.go b/climate-server.go index 6f351a8..62c8840 100644 --- a/climate-server.go +++ b/climate-server.go @@ -41,7 +41,7 @@ func startServer() { r.HandleFunc("/data/since/{mins}", sendData).Methods("GET") r.HandleFunc("/data/last/", sendLastSnapshot).Methods("GET") r.HandleFunc("/", saveSnapshot).Methods("POST") - r.PathPrefix("/static/").Handler(http.StripPrefix("/" + ROOT_URL + "static/", http.FileServer(http.Dir("static/")))) + r.PathPrefix("/static/").Handler(http.StripPrefix("/static/", http.FileServer(http.Dir("static/")))) http.Handle("/", r) fmt.Printf("Listening on port %s...\n", port) log.Fatal(http.ListenAndServe(":"+port, nil))