name confusion Enabled -> Started.

This commit is contained in:
Miroslav Šedivý
2021-02-05 14:03:53 +01:00
parent 18b6fa0a03
commit 36b7eca43c
6 changed files with 25 additions and 25 deletions

View File

@ -16,7 +16,7 @@ type BroadcastStatusPayload struct {
func (h *RoomHandler) broadcastStatus(w http.ResponseWriter, r *http.Request) {
broadcast := h.capture.Broadcast()
utils.HttpSuccess(w, BroadcastStatusPayload{
IsActive: broadcast.Enabled(),
IsActive: broadcast.Started(),
URL: broadcast.Url(),
})
}
@ -33,7 +33,7 @@ func (h *RoomHandler) boradcastStart(w http.ResponseWriter, r *http.Request) {
}
broadcast := h.capture.Broadcast()
if broadcast.Enabled() {
if broadcast.Started() {
utils.HttpUnprocessableEntity(w, "Server is already broadcasting.")
return
}
@ -46,7 +46,7 @@ func (h *RoomHandler) boradcastStart(w http.ResponseWriter, r *http.Request) {
h.sessions.AdminBroadcast(
message.BroadcastStatus{
Event: event.BORADCAST_STATUS,
IsActive: broadcast.Enabled(),
IsActive: broadcast.Started(),
URL: broadcast.Url(),
}, nil)
@ -55,7 +55,7 @@ func (h *RoomHandler) boradcastStart(w http.ResponseWriter, r *http.Request) {
func (h *RoomHandler) boradcastStop(w http.ResponseWriter, r *http.Request) {
broadcast := h.capture.Broadcast()
if !broadcast.Enabled() {
if !broadcast.Started() {
utils.HttpUnprocessableEntity(w, "Server is not broadcasting.")
return
}
@ -65,7 +65,7 @@ func (h *RoomHandler) boradcastStop(w http.ResponseWriter, r *http.Request) {
h.sessions.AdminBroadcast(
message.BroadcastStatus{
Event: event.BORADCAST_STATUS,
IsActive: broadcast.Enabled(),
IsActive: broadcast.Started(),
URL: broadcast.Url(),
}, nil)