reduced v13 struct to doorstatus only
This commit is contained in:
parent
9cefcf2ff0
commit
a17161d861
|
@ -12,6 +12,7 @@ func Poll(url string, led int) {
|
|||
for true {
|
||||
resp, err := http.Get(url)
|
||||
if err != nil {
|
||||
err.Error()
|
||||
ErrorPoll(url, err, led)
|
||||
} else {
|
||||
data, err := ioutil.ReadAll(resp.Body)
|
||||
|
@ -21,7 +22,7 @@ func Poll(url string, led int) {
|
|||
} else {
|
||||
_ = resp.Body.Close()
|
||||
|
||||
var parsed V13
|
||||
var parsed dooronly
|
||||
err = json.Unmarshal(data, &parsed)
|
||||
if err != nil {
|
||||
ErrorPoll(url, err, led)
|
||||
|
|
Loading…
Reference in New Issue