diff --git a/example.config.json b/example.config.json index ef11cd8..d1f81e6 100644 --- a/example.config.json +++ b/example.config.json @@ -7,6 +7,7 @@ }, "unifi": { "enabled": false, + "displayusers": true, "APIUrl": "https://unifi.freifunk-troisdorf.de:8443", "user": "APIuser", "password": "PASSWORD", diff --git a/main.go b/main.go index 6f10cab..7c29eb8 100644 --- a/main.go +++ b/main.go @@ -110,7 +110,7 @@ func processUcAPIs() ([]node, []link) { } var model = lookupModels(currentDevice.Model) var clients = currentDevice.Users - if conf.Meshviewer.Enabled == false { + if conf.Unifi.DisplayUsers == false { clients = 0 } nodes = append(nodes, node{ diff --git a/types.go b/types.go index 0bdc88c..cc61ec1 100644 --- a/types.go +++ b/types.go @@ -19,6 +19,7 @@ type config struct { } `json:"unms"` Unifi struct { Enabled bool `json:"enabled"` + DisplayUsers bool `json:"enabled"` APIURL string `json:"APIUrl"` User string `json:"user"` Password string `json:"password"`