Settings as clean architecture

This commit is contained in:
Shin'ya Ueoka 2018-07-22 00:01:24 +09:00
parent 0652131de8
commit 89c28d67fd
11 changed files with 176 additions and 33 deletions

View file

@ -0,0 +1,18 @@
import SettingInteractor from '../usecases/setting';
import ContentMessageClient from '../infrastructures/content-message-client';
export default class SettingController {
constructor() {
this.settingInteractor = new SettingInteractor();
this.contentMessageClient = new ContentMessageClient();
}
getSetting() {
return this.settingInteractor.get();
}
async reload() {
await this.settingInteractor.reload();
this.contentMessageClient.broadcastSettingsChanged();
}
}