1
0

In DJHandlers.Status in an anonymous struct removed a pointer to Song.

This commit is contained in:
Alexander Andreev 2023-10-05 18:54:44 +04:00
parent c33ff03bd8
commit 2f96976f19
Signed by: Arav
GPG Key ID: D22A817D95815393

View File

@ -93,7 +93,7 @@ func (dj *DJHandlers) Songs(w http.ResponseWriter, r *http.Request) {
func (dj *DJHandlers) Status(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Content-Type", "application/json")
err := json.NewEncoder(w).Encode(&struct {
Current *radio.Song `json:"current_song,omitempty"`
Current radio.Song `json:"current_song,omitempty"`
Listeners *radio.ListenerCounter `json:"listeners"`
List []radio.Song `json:"last_songs,omitempty"`
Mls *radio.MostListenedSong `json:"most_listened_song,omitempty"`