From 2fb2e5f151e8bd4845885fdea099fef311faf4c2 Mon Sep 17 00:00:00 2001 From: Bennett Wetters Date: Tue, 16 Jan 2024 01:48:48 +0100 Subject: [PATCH] We don't need to write anything on successful requests actually, 200 is the default --- handlers/sensors.go | 3 --- handlers/state.go | 3 --- 2 files changed, 6 deletions(-) diff --git a/handlers/sensors.go b/handlers/sensors.go index 0c30346..bd881fb 100644 --- a/handlers/sensors.go +++ b/handlers/sensors.go @@ -1,7 +1,6 @@ package handlers import ( - "io" "log" "math" "net/http" @@ -34,7 +33,5 @@ func EnvironmentSensor( // Set SpaceAPI response values resp.Value = newState resp.LastChange = time.Now().Unix() - - _, _ = io.WriteString(w, "Update Successful") } } diff --git a/handlers/state.go b/handlers/state.go index 72384e5..0ec9727 100644 --- a/handlers/state.go +++ b/handlers/state.go @@ -1,7 +1,6 @@ package handlers import ( - "io" "log" "net/http" "strconv" @@ -33,7 +32,5 @@ func StateOpen( // Set SpaceAPI response values resp.Open = newState resp.LastChange = time.Now().Unix() - - _, _ = io.WriteString(w, "Update Successful") } }