Changed endpoints and db queries, chart now shows suggested mins and maxes
This commit is contained in:
@@ -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")
|
||||||
|
|||||||
Reference in New Issue
Block a user