import { injectable } from "tsyringe"; import SettingUseCase from "../usecases/SettingUseCase"; import ContentMessageClient from "../infrastructures/ContentMessageClient"; import Settings from "../../shared/settings/Settings"; @injectable() export default class SettingController { constructor( private settingUseCase: SettingUseCase, private contentMessageClient: ContentMessageClient ) {} getSetting(): Promise { return this.settingUseCase.getCached(); } async reload(): Promise { await this.settingUseCase.reload(); this.contentMessageClient.broadcastSettingsChanged(); } }