Only pass State struct pointer to StateOpen, not entire response
This commit is contained in:
parent
44143c0c2d
commit
70b2e8069b
3 changed files with 10 additions and 8 deletions
2
main.go
2
main.go
|
@ -37,7 +37,7 @@ func main() {
|
|||
handlers.Root(&conf.Response),
|
||||
)
|
||||
http.HandleFunc("/state/open",
|
||||
handlers.StateOpen(conf.Credentials, conf.Dynamic.State.Open.AllowedCredentials, &conf.Response),
|
||||
handlers.StateOpen(conf.Credentials, conf.Dynamic.State.Open.AllowedCredentials, &conf.Response.State),
|
||||
)
|
||||
// Register handlers for Environmental Sensors
|
||||
for key, envSensorConfigs := range conf.Dynamic.Sensors {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue