We don't need to write anything on successful requests actually, 200 is the default

This commit is contained in:
Bendodroid 2024-01-16 01:48:48 +01:00
parent fa6e6bd142
commit 2fb2e5f151
Signed by: bendodroid
GPG key ID: 3EEE19A0F73D5FFC
2 changed files with 0 additions and 6 deletions

View file

@ -1,7 +1,6 @@
package handlers package handlers
import ( import (
"io"
"log" "log"
"math" "math"
"net/http" "net/http"
@ -34,7 +33,5 @@ func EnvironmentSensor(
// Set SpaceAPI response values // Set SpaceAPI response values
resp.Value = newState resp.Value = newState
resp.LastChange = time.Now().Unix() resp.LastChange = time.Now().Unix()
_, _ = io.WriteString(w, "Update Successful")
} }
} }

View file

@ -1,7 +1,6 @@
package handlers package handlers
import ( import (
"io"
"log" "log"
"net/http" "net/http"
"strconv" "strconv"
@ -33,7 +32,5 @@ func StateOpen(
// Set SpaceAPI response values // Set SpaceAPI response values
resp.Open = newState resp.Open = newState
resp.LastChange = time.Now().Unix() resp.LastChange = time.Now().Unix()
_, _ = io.WriteString(w, "Update Successful")
} }
} }