diff --git a/frontend/projects/shared-meet-components/src/lib/services/global-config.service.ts b/frontend/projects/shared-meet-components/src/lib/services/global-config.service.ts index 0a441f1..932d57d 100644 --- a/frontend/projects/shared-meet-components/src/lib/services/global-config.service.ts +++ b/frontend/projects/shared-meet-components/src/lib/services/global-config.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; import { HttpService } from '@lib/services'; -import { AuthMode, SecurityConfig, WebhookConfig } from '@lib/typings/ce'; +import { AuthMode, MeetAppearanceConfig, SecurityConfig, WebhookConfig } from '@lib/typings/ce'; import { LoggerService } from 'openvidu-components-angular'; @Injectable({ @@ -47,13 +47,8 @@ export class GlobalConfigService { } async getWebhookConfig(): Promise { - try { - const path = `${this.GLOBAL_CONFIG_API}/webhooks`; - return await this.httpService.getRequest(path); - } catch (error) { - this.log.e('Error fetching webhook config:', error); - throw error; - } + const path = `${this.GLOBAL_CONFIG_API}/webhooks`; + return await this.httpService.getRequest(path); } async saveWebhookConfig(config: WebhookConfig) { @@ -65,4 +60,14 @@ export class GlobalConfigService { const path = `${this.GLOBAL_CONFIG_API}/webhooks/test`; await this.httpService.postRequest(path, { url }); } + + async getRoomsAppearanceConfig(): Promise<{ appearance: MeetAppearanceConfig }> { + const path = `${this.GLOBAL_CONFIG_API}/rooms/appearance`; + return await this.httpService.getRequest<{ appearance: MeetAppearanceConfig }>(path); + } + + async saveRoomsAppearanceConfig(config: MeetAppearanceConfig) { + const path = `${this.GLOBAL_CONFIG_API}/rooms/appearance`; + await this.httpService.putRequest(path, { appearance: config }); + } }