We don't need to write anything on successful requests actually, 200 is the default
This commit is contained in:
parent
fa6e6bd142
commit
2fb2e5f151
|
@ -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")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue