1
0

Added missing JSON Content-Type.

This commit is contained in:
Alexander Andreev 2022-03-31 02:15:16 +04:00
parent 4740f9ddc3
commit 9d2e52aec3
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -83,6 +83,7 @@ func (h *RadioHandlers) Stats(w http.ResponseWriter, _ *http.Request) {
return
}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(status)
}
@ -96,6 +97,8 @@ func (h *RadioHandlers) LastSong(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusNotFound)
return
}
w.Header().Add("Content-Type", "application/json")
json.NewEncoder(w).Encode(songs[0])
}