refactor: drop unused param in dashboard online() (ponytail) 🦥

This commit is contained in:
shoemoney 2026-06-23 12:47:50 -05:00
parent 35d4d5dfd3
commit 9f662cd476

View file

@ -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++
} }