mirror of
https://github.com/unpoller/unpoller.git
synced 2026-10-19 07:41:32 +02:00
Update networks.go
Co-authored-by: David Newhall II <david@sleepers.pro>
This commit is contained in:
committed by
GitHub
co-authored by
David Newhall II
parent
422c3f220f
commit
95f017cae6
@@ -29,10 +29,9 @@ func (u *Unifi) GetNetworks(sites []*Site) ([]Network, error) {
|
||||
}
|
||||
|
||||
// parseNetwork parses the raw JSON from the Unifi Controller into network structures.
|
||||
func (u *Unifi) parseNetwork(data json.RawMessage, siteName string) *Network {
|
||||
func (u *Unifi) parseNetwork(data json.RawMessage, siteName string) (*Network, error) {
|
||||
network := new(Network)
|
||||
u.unmarshalNetwork(data, &network)
|
||||
return network
|
||||
return network, u.unmarshalDevice(data, network)
|
||||
}
|
||||
|
||||
// Network is metadata about a network managed by a UniFi controller
|
||||
|
||||
Reference in New Issue
Block a user