frontend: add methods to get and save rooms appearance configuration
This commit is contained in:
parent
1f24c461b8
commit
ace0033720
@ -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<WebhookConfig> {
|
||||
try {
|
||||
const path = `${this.GLOBAL_CONFIG_API}/webhooks`;
|
||||
return await this.httpService.getRequest<WebhookConfig>(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<WebhookConfig>(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 });
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user