diff --git a/server/internal/api/room/broadcast.go b/server/internal/api/room/broadcast.go index 75e047c0..5f8319ee 100644 --- a/server/internal/api/room/broadcast.go +++ b/server/internal/api/room/broadcast.go @@ -22,7 +22,7 @@ func (h *RoomHandler) broadcastStatus(w http.ResponseWriter, r *http.Request) er }) } -func (h *RoomHandler) boradcastStart(w http.ResponseWriter, r *http.Request) error { +func (h *RoomHandler) broadcastStart(w http.ResponseWriter, r *http.Request) error { data := &BroadcastStatusPayload{} if err := utils.HttpJsonRequest(w, r, data); err != nil { return err @@ -42,7 +42,7 @@ func (h *RoomHandler) boradcastStart(w http.ResponseWriter, r *http.Request) err } h.sessions.AdminBroadcast( - event.BORADCAST_STATUS, + event.BROADCAST_STATUS, message.BroadcastStatus{ IsActive: broadcast.Started(), URL: broadcast.Url(), @@ -51,7 +51,7 @@ func (h *RoomHandler) boradcastStart(w http.ResponseWriter, r *http.Request) err return utils.HttpSuccess(w) } -func (h *RoomHandler) boradcastStop(w http.ResponseWriter, r *http.Request) error { +func (h *RoomHandler) broadcastStop(w http.ResponseWriter, r *http.Request) error { broadcast := h.capture.Broadcast() if !broadcast.Started() { return utils.HttpUnprocessableEntity("server is not broadcasting") @@ -60,7 +60,7 @@ func (h *RoomHandler) boradcastStop(w http.ResponseWriter, r *http.Request) erro broadcast.Stop() h.sessions.AdminBroadcast( - event.BORADCAST_STATUS, + event.BROADCAST_STATUS, message.BroadcastStatus{ IsActive: broadcast.Started(), URL: broadcast.Url(), diff --git a/server/internal/api/room/handler.go b/server/internal/api/room/handler.go index 8ca7aead..62344f5c 100644 --- a/server/internal/api/room/handler.go +++ b/server/internal/api/room/handler.go @@ -62,8 +62,8 @@ func (h *RoomHandler) Route(r types.Router) { r.With(auth.AdminsOnly).Route("/broadcast", func(r types.Router) { r.Get("/", h.broadcastStatus) - r.Post("/start", h.boradcastStart) - r.Post("/stop", h.boradcastStop) + r.Post("/start", h.broadcastStart) + r.Post("/stop", h.broadcastStop) }) r.With(auth.CanAccessClipboardOnly).With(auth.HostsOnly).Route("/clipboard", func(r types.Router) { diff --git a/server/openapi.yaml b/server/openapi.yaml index b7ba4425..1284aea2 100644 --- a/server/openapi.yaml +++ b/server/openapi.yaml @@ -265,7 +265,7 @@ paths: tags: - room summary: start broadcast - operationId: boradcastStart + operationId: broadcastStart responses: '204': description: OK @@ -302,7 +302,7 @@ paths: tags: - room summary: stop broadcast - operationId: boradcastStop + operationId: broadcastStop responses: '204': description: OK diff --git a/server/pkg/types/event/events.go b/server/pkg/types/event/events.go index 32857b9e..0259d4d7 100644 --- a/server/pkg/types/event/events.go +++ b/server/pkg/types/event/events.go @@ -70,7 +70,7 @@ const ( ) const ( - BORADCAST_STATUS = "broadcast/status" + BROADCAST_STATUS = "broadcast/status" ) const (