Now that only current number of listeners is being shown, send just it instead of a whole ListenerCounter.
This commit is contained in:
parent
c8f71b205b
commit
d2db23be5d
@ -134,11 +134,11 @@ 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"`
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user