Changed endpoints and db queries, chart now shows suggested mins and maxes

This commit is contained in:
Daniel Ledda
2020-11-07 01:28:32 +01:00
parent 9ea6088ce4
commit 19b4bab554

View File

@@ -50,7 +50,7 @@ func startServer() {
func showCharts(w http.ResponseWriter, r *http.Request) { func showCharts(w http.ResponseWriter, r *http.Request) {
if countStr := mux.Vars(r)["mins"]; countStr != "" { if countStr := mux.Vars(r)["mins"]; countStr != "" {
if _, err := strconv.ParseInt(countStr, 10, 0); err != nil { if _, err := strconv.ParseInt(countStr, 10, 0); err != nil {
http.Redirect(w, r, ROOT_URL + "/", 303) http.Redirect(w, r, "/" + ROOT_URL + "/", 303)
} }
} }
http.ServeFile(w, r, "charts.html") http.ServeFile(w, r, "charts.html")