diff options
Diffstat (limited to 'src/content/usecases/FindSlaveUseCase.ts')
-rw-r--r-- | src/content/usecases/FindSlaveUseCase.ts | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/content/usecases/FindSlaveUseCase.ts b/src/content/usecases/FindSlaveUseCase.ts index b733cbd..0a5c2ce 100644 --- a/src/content/usecases/FindSlaveUseCase.ts +++ b/src/content/usecases/FindSlaveUseCase.ts @@ -1,13 +1,11 @@ -import FindMasterClient, { FindMasterClientImpl } - from '../client/FindMasterClient'; +import { injectable, inject } from 'tsyringe'; +import FindMasterClient from '../client/FindMasterClient'; +@injectable() export default class FindSlaveUseCase { - private findMasterClient: FindMasterClient; - - constructor({ - findMasterClient = new FindMasterClientImpl(), - } = {}) { - this.findMasterClient = findMasterClient; + constructor( + @inject('FindMasterClient') private findMasterClient: FindMasterClient, + ) { } findNext() { |