Added missing JSON Content-Type.
This commit is contained in:
parent
4740f9ddc3
commit
9d2e52aec3
@ -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])
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user