diff --git a/handlers/root.go b/handlers/root.go index 1015f49..e6ee447 100644 --- a/handlers/root.go +++ b/handlers/root.go @@ -26,10 +26,8 @@ func Root(resp *types.SpaceAPIResponseV14) func(http.ResponseWriter, *http.Reque return } - // Respond with OK w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Content-Type", "application/json") - w.WriteHeader(http.StatusOK) _, _ = w.Write(response) } } diff --git a/handlers/sensors.go b/handlers/sensors.go index 7441699..ec0a6aa 100644 --- a/handlers/sensors.go +++ b/handlers/sensors.go @@ -32,8 +32,6 @@ func EnvironmentSensor( resp.Value = newState resp.LastChange = time.Now().Unix() - // Respond with OK - w.WriteHeader(http.StatusOK) _, _ = io.WriteString(w, "Update Successful") } } diff --git a/handlers/state.go b/handlers/state.go index 47bc6ab..b834072 100644 --- a/handlers/state.go +++ b/handlers/state.go @@ -31,8 +31,6 @@ func StateOpen( resp.Open = newState resp.LastChange = time.Now().Unix() - // Respond with OK - w.WriteHeader(http.StatusOK) _, _ = io.WriteString(w, "Update Successful") } }