refactor
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { IAllTeamsPresenter, AllTeamsResultDTO, AllTeamsViewModel } from '@gridpilot/racing/application/presenters/IAllTeamsPresenter';
|
||||
import { TeamListItemViewModel } from '../dto/TeamDto';
|
||||
import { IAllTeamsPresenter, AllTeamsResultDTO, AllTeamsViewModel, TeamListItemViewModel } from '@gridpilot/racing/application/presenters/IAllTeamsPresenter';
|
||||
|
||||
export class AllTeamsPresenter implements IAllTeamsPresenter {
|
||||
private result: AllTeamsViewModel | null = null;
|
||||
@@ -24,6 +23,10 @@ export class AllTeamsPresenter implements IAllTeamsPresenter {
|
||||
};
|
||||
}
|
||||
|
||||
getViewModel(): AllTeamsViewModel | null {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
get viewModel(): AllTeamsViewModel {
|
||||
if (!this.result) throw new Error('Presenter not presented');
|
||||
return this.result;
|
||||
|
||||
Reference in New Issue
Block a user