In ListenersGet() text/plain was replaced by application/json.
This commit is contained in:
parent
d2851c6fb8
commit
f0438ff822
@ -23,8 +23,8 @@ func NewDJHandlers(l *radio.ListenerCounter, p *radio.Playlist, slLen int) *DJHa
|
||||
}
|
||||
|
||||
func (dj *DJHandlers) ListenersGet(w http.ResponseWriter, _ *http.Request) {
|
||||
w.Header().Add("Content-Type", "text/plain")
|
||||
fmt.Fprint(w, dj.listeners.Current(), dj.listeners.Peak())
|
||||
w.Header().Add("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(dj.listeners)
|
||||
}
|
||||
|
||||
func (dj *DJHandlers) ListenersInc(w http.ResponseWriter, _ *http.Request) {
|
||||
|
Loading…
Reference in New Issue
Block a user