Url is now actually passed to the computer struct for wol
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Dreaded_X 2022-11-21 21:58:22 +01:00
parent 301551596a
commit 4227bd92b5
Signed by: Dreaded_X
GPG Key ID: 76BDEC4E165D8AD9

View File

@ -14,16 +14,19 @@ type computer struct {
}
func NewComputer(macAddress string, name device.InternalName, url string) *computer {
c := &computer{macAddress: macAddress, name: name}
c := &computer{macAddress, name, url}
return c
}
func (c *computer) Activate(state bool) {
if state {
http.Get(c.url)
_, err := http.Get(c.url)
if err != nil {
log.Println(err)
}
} else {
// Scene does not implement this
// This is not implemented
}
}