Clean classes and repository
This commit is contained in:
parent
a880d5684b
commit
f707f4da75
10 changed files with 279 additions and 251 deletions
|
@ -1,8 +1,12 @@
|
|||
import FindRepository from '../repositories/FindRepository';
|
||||
import TabPresenter from '../presenters/TabPresenter';
|
||||
import ConsoleClient from '../infrastructures/ConsoleClient';
|
||||
|
||||
export default class FindUseCase {
|
||||
constructor() {
|
||||
this.tabPresenter = new TabPresenter();
|
||||
this.findRepository = new FindRepository();
|
||||
this.consoleClient = new ConsoleClient();
|
||||
}
|
||||
|
||||
getKeyword() {
|
||||
|
@ -12,4 +16,9 @@ export default class FindUseCase {
|
|||
setKeyword(keyword) {
|
||||
return this.findRepository.setKeyword(keyword);
|
||||
}
|
||||
|
||||
async findStart() {
|
||||
let tab = await this.tabPresenter.getCurrent();
|
||||
return this.consoleClient.showFind(tab.id);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue