From c5f0dd8419d0511d2949a615ba7f65f94bcc4007 Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 5 Dec 2024 22:12:57 +0100 Subject: [PATCH] values can be entered with an , --- server/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server/server.go b/server/server.go index 96d3b4a..a9f89cc 100644 --- a/server/server.go +++ b/server/server.go @@ -42,6 +42,9 @@ func Run(env map[string]string) { return } + tempCelsius = strings.Replace(tempCelsius, ",", ".", 1) + relativeHumidity = strings.Replace(relativeHumidity, ",", ".", 1) + // Convert query parameters to float64 temp, err := strconv.ParseFloat(tempCelsius, 32) if err != nil {