fix broadcast typo.

This commit is contained in:
Miroslav Šedivý 2024-07-18 23:54:20 +02:00
parent 35edeb94b2
commit 5527642878
7 changed files with 31 additions and 31 deletions

View File

@ -50,9 +50,9 @@ export const RoomApiAxiosParamCreator = function (configuration?: Configuration)
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
boradcastStart: async (broadcastStatus: BroadcastStatus, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { broadcastStart: async (broadcastStatus: BroadcastStatus, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'broadcastStatus' is not null or undefined // verify required parameter 'broadcastStatus' is not null or undefined
assertParamExists('boradcastStart', 'broadcastStatus', broadcastStatus) assertParamExists('broadcastStart', 'broadcastStatus', broadcastStatus)
const localVarPath = `/api/room/broadcast/start`; const localVarPath = `/api/room/broadcast/start`;
// use dummy base URL string because the URL constructor only accepts absolute URLs. // use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@ -94,7 +94,7 @@ export const RoomApiAxiosParamCreator = function (configuration?: Configuration)
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
boradcastStop: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { broadcastStop: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/room/broadcast/stop`; const localVarPath = `/api/room/broadcast/stop`;
// use dummy base URL string because the URL constructor only accepts absolute URLs. // use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@ -1146,10 +1146,10 @@ export const RoomApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
async boradcastStart(broadcastStatus: BroadcastStatus, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { async broadcastStart(broadcastStatus: BroadcastStatus, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.boradcastStart(broadcastStatus, options); const localVarAxiosArgs = await localVarAxiosParamCreator.broadcastStart(broadcastStatus, options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['RoomApi.boradcastStart']?.[localVarOperationServerIndex]?.url; const localVarOperationServerBasePath = operationServerMap['RoomApi.broadcastStart']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
}, },
/** /**
@ -1158,10 +1158,10 @@ export const RoomApiFp = function(configuration?: Configuration) {
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
async boradcastStop(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { async broadcastStop(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.boradcastStop(options); const localVarAxiosArgs = await localVarAxiosParamCreator.broadcastStop(options);
const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
const localVarOperationServerBasePath = operationServerMap['RoomApi.boradcastStop']?.[localVarOperationServerIndex]?.url; const localVarOperationServerBasePath = operationServerMap['RoomApi.broadcastStop']?.[localVarOperationServerIndex]?.url;
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
}, },
/** /**
@ -1479,8 +1479,8 @@ export const RoomApiFactory = function (configuration?: Configuration, basePath?
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
boradcastStart(broadcastStatus: BroadcastStatus, options?: any): AxiosPromise<void> { broadcastStart(broadcastStatus: BroadcastStatus, options?: any): AxiosPromise<void> {
return localVarFp.boradcastStart(broadcastStatus, options).then((request) => request(axios, basePath)); return localVarFp.broadcastStart(broadcastStatus, options).then((request) => request(axios, basePath));
}, },
/** /**
* *
@ -1488,8 +1488,8 @@ export const RoomApiFactory = function (configuration?: Configuration, basePath?
* @param {*} [options] Override http request option. * @param {*} [options] Override http request option.
* @throws {RequiredError} * @throws {RequiredError}
*/ */
boradcastStop(options?: any): AxiosPromise<void> { broadcastStop(options?: any): AxiosPromise<void> {
return localVarFp.boradcastStop(options).then((request) => request(axios, basePath)); return localVarFp.broadcastStop(options).then((request) => request(axios, basePath));
}, },
/** /**
* *
@ -1735,8 +1735,8 @@ export class RoomApi extends BaseAPI {
* @throws {RequiredError} * @throws {RequiredError}
* @memberof RoomApi * @memberof RoomApi
*/ */
public boradcastStart(broadcastStatus: BroadcastStatus, options?: RawAxiosRequestConfig) { public broadcastStart(broadcastStatus: BroadcastStatus, options?: RawAxiosRequestConfig) {
return RoomApiFp(this.configuration).boradcastStart(broadcastStatus, options).then((request) => request(this.axios, this.basePath)); return RoomApiFp(this.configuration).broadcastStart(broadcastStatus, options).then((request) => request(this.axios, this.basePath));
} }
/** /**
@ -1746,8 +1746,8 @@ export class RoomApi extends BaseAPI {
* @throws {RequiredError} * @throws {RequiredError}
* @memberof RoomApi * @memberof RoomApi
*/ */
public boradcastStop(options?: RawAxiosRequestConfig) { public broadcastStop(options?: RawAxiosRequestConfig) {
return RoomApiFp(this.configuration).boradcastStop(options).then((request) => request(this.axios, this.basePath)); return RoomApiFp(this.configuration).broadcastStop(options).then((request) => request(this.axios, this.basePath));
} }
/** /**

View File

@ -136,7 +136,7 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
this._state.screen.configurations = list // TODO: Vue.Set this._state.screen.configurations = list // TODO: Vue.Set
this[EVENT.BORADCAST_STATUS](broadcast_status) this[EVENT.BROADCAST_STATUS](broadcast_status)
} }
protected [EVENT.SYSTEM_SETTINGS]({ id, ...settings }: message.SystemSettingsUpdate) { protected [EVENT.SYSTEM_SETTINGS]({ id, ...settings }: message.SystemSettingsUpdate) {
@ -320,8 +320,8 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
// Broadcast Events // Broadcast Events
///////////////////////////// /////////////////////////////
protected [EVENT.BORADCAST_STATUS]({ url, is_active }: message.BroadcastStatus) { protected [EVENT.BROADCAST_STATUS]({ url, is_active }: message.BroadcastStatus) {
this._localLog.debug(`EVENT.BORADCAST_STATUS`) this._localLog.debug(`EVENT.BROADCAST_STATUS`)
// TODO: Handle. // TODO: Handle.
this.emit('room.broadcast.status', is_active, url) this.emit('room.broadcast.status', is_active, url)
} }
@ -336,7 +336,7 @@ export class NekoMessages extends EventEmitter<NekoEvents> {
} }
protected [EVENT.SEND_BROADCAST]({ sender, subject, body }: message.SendMessage) { protected [EVENT.SEND_BROADCAST]({ sender, subject, body }: message.SendMessage) {
this._localLog.debug(`EVENT.BORADCAST_STATUS`) this._localLog.debug(`EVENT.BROADCAST_STATUS`)
this.emit('receive.broadcast', sender, subject, body) this.emit('receive.broadcast', sender, subject, body)
} }

View File

@ -53,7 +53,7 @@ export const CLIPBOARD_SET = 'clipboard/set'
export const KEYBOARD_MODIFIERS = 'keyboard/modifiers' export const KEYBOARD_MODIFIERS = 'keyboard/modifiers'
export const KEYBOARD_MAP = 'keyboard/map' export const KEYBOARD_MAP = 'keyboard/map'
export const BORADCAST_STATUS = 'broadcast/status' export const BROADCAST_STATUS = 'broadcast/status'
export const SEND_UNICAST = 'send/unicast' export const SEND_UNICAST = 'send/unicast'
export const SEND_BROADCAST = 'send/broadcast' export const SEND_BROADCAST = 'send/broadcast'

View File

@ -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{} data := &BroadcastStatusPayload{}
if err := utils.HttpJsonRequest(w, r, data); err != nil { if err := utils.HttpJsonRequest(w, r, data); err != nil {
return err return err
@ -42,7 +42,7 @@ func (h *RoomHandler) boradcastStart(w http.ResponseWriter, r *http.Request) err
} }
h.sessions.AdminBroadcast( h.sessions.AdminBroadcast(
event.BORADCAST_STATUS, event.BROADCAST_STATUS,
message.BroadcastStatus{ message.BroadcastStatus{
IsActive: broadcast.Started(), IsActive: broadcast.Started(),
URL: broadcast.Url(), URL: broadcast.Url(),
@ -51,7 +51,7 @@ func (h *RoomHandler) boradcastStart(w http.ResponseWriter, r *http.Request) err
return utils.HttpSuccess(w) 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() broadcast := h.capture.Broadcast()
if !broadcast.Started() { if !broadcast.Started() {
return utils.HttpUnprocessableEntity("server is not broadcasting") return utils.HttpUnprocessableEntity("server is not broadcasting")
@ -60,7 +60,7 @@ func (h *RoomHandler) boradcastStop(w http.ResponseWriter, r *http.Request) erro
broadcast.Stop() broadcast.Stop()
h.sessions.AdminBroadcast( h.sessions.AdminBroadcast(
event.BORADCAST_STATUS, event.BROADCAST_STATUS,
message.BroadcastStatus{ message.BroadcastStatus{
IsActive: broadcast.Started(), IsActive: broadcast.Started(),
URL: broadcast.Url(), URL: broadcast.Url(),

View File

@ -62,8 +62,8 @@ func (h *RoomHandler) Route(r types.Router) {
r.With(auth.AdminsOnly).Route("/broadcast", func(r types.Router) { r.With(auth.AdminsOnly).Route("/broadcast", func(r types.Router) {
r.Get("/", h.broadcastStatus) r.Get("/", h.broadcastStatus)
r.Post("/start", h.boradcastStart) r.Post("/start", h.broadcastStart)
r.Post("/stop", h.boradcastStop) r.Post("/stop", h.broadcastStop)
}) })
r.With(auth.CanAccessClipboardOnly).With(auth.HostsOnly).Route("/clipboard", func(r types.Router) { r.With(auth.CanAccessClipboardOnly).With(auth.HostsOnly).Route("/clipboard", func(r types.Router) {

View File

@ -265,7 +265,7 @@ paths:
tags: tags:
- room - room
summary: start broadcast summary: start broadcast
operationId: boradcastStart operationId: broadcastStart
responses: responses:
'204': '204':
description: OK description: OK
@ -302,7 +302,7 @@ paths:
tags: tags:
- room - room
summary: stop broadcast summary: stop broadcast
operationId: boradcastStop operationId: broadcastStop
responses: responses:
'204': '204':
description: OK description: OK

View File

@ -70,7 +70,7 @@ const (
) )
const ( const (
BORADCAST_STATUS = "broadcast/status" BROADCAST_STATUS = "broadcast/status"
) )
const ( const (