diff --git a/internal/http/dj_handlers.go b/internal/http/dj_handlers.go index 824bf7a..2e20f0b 100644 --- a/internal/http/dj_handlers.go +++ b/internal/http/dj_handlers.go @@ -133,12 +133,12 @@ func (dj *DJHandlers) Status(w http.ResponseWriter, r *http.Request) { } err = json.NewEncoder(w).Encode(&struct { - Current *radio.Song `json:"current_song,omitempty"` - Listeners *radio.ListenerCounter `json:"listeners"` - List []radio.Song `json:"last_songs,omitempty"` + Current *radio.Song `json:"current_song,omitempty"` + Listeners int64 `json:"listeners"` + List []radio.Song `json:"last_songs,omitempty"` }{ Current: dj.curSong, - Listeners: dj.listeners, + Listeners: dj.listeners.Current(), List: lst}) if err != nil { log.Println("DJHandlers.Status:", err)