blob: d5f66c6ba19c25015244ca4e82047b29ce978fc0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
import { injectable, inject } from 'tsyringe';
import SettingRepository from '../repositories/SettingRepository';
import SettingClient from '../client/SettingClient';
import Settings from '../../shared/Settings';
@injectable()
export default class SettingUseCase {
constructor(
@inject('SettingRepository') private repository: SettingRepository,
@inject('SettingClient') private client: SettingClient,
) {
}
async reload(): Promise<Settings> {
let settings = await this.client.load();
this.repository.set(settings);
return settings;
}
}
|