1
0

Now that only current number of listeners is being shown, send just it instead of a whole ListenerCounter.

This commit is contained in:
Alexander Andreev 2024-05-12 03:57:54 +04:00
parent c8f71b205b
commit d2db23be5d
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

@ -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)