refactor: drop unused param in dashboard online() (ponytail) 🦥
This commit is contained in:
parent
35d4d5dfd3
commit
9f662cd476
1 changed files with 2 additions and 2 deletions
|
|
@ -68,7 +68,7 @@ func (d *Dashboard) Emit(ev Event) {
|
||||||
d.broker.publish(ev)
|
d.broker.publish(ev)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *Dashboard) online(deviceID, _ string, now int64) bool {
|
func (d *Dashboard) online(deviceID string, now int64) bool {
|
||||||
d.mu.Lock()
|
d.mu.Lock()
|
||||||
defer d.mu.Unlock()
|
defer d.mu.Unlock()
|
||||||
ts, ok := d.lastSeen[deviceID]
|
ts, ok := d.lastSeen[deviceID]
|
||||||
|
|
@ -138,7 +138,7 @@ func (d *Dashboard) handleState(w http.ResponseWriter, _ *http.Request) {
|
||||||
var online int64
|
var online int64
|
||||||
devices := make([]deviceJSON, 0, len(devs))
|
devices := make([]deviceJSON, 0, len(devs))
|
||||||
for _, dv := range devs {
|
for _, dv := range devs {
|
||||||
on := d.online(dv.ID, dv.Name, now)
|
on := d.online(dv.ID, now)
|
||||||
if on {
|
if on {
|
||||||
online++
|
online++
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue