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

This commit is contained in:
Daniel Ledda
2020-11-07 15:08:48 +01:00
parent 85bef1d4a3
commit 7eb97118b2
2 changed files with 3 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"errors"
"fmt"
_ "github.com/go-sql-driver/mysql"
"github.com/gorilla/mux"
@@ -91,7 +92,7 @@ func saveSnapshot(w http.ResponseWriter, r *http.Request) {
}
func internalErrorOnErr(err error, w http.ResponseWriter, r *http.Request) bool {
if err != nil {
if errors.Unwrap(err) != nil {
errorMessage := "Internal Server Error!"
if DEBUG {
errorMessage += fmt.Sprintf(" Happened during %s request for pattern '%s': %s",