api client refactor
This commit is contained in:
@@ -5,10 +5,8 @@ import type {
|
||||
} from '@core/racing/application/presenters/IRaceWithSOFPresenter';
|
||||
|
||||
export class RaceWithSOFPresenter implements IRaceWithSOFPresenter {
|
||||
private viewModel: RaceWithSOFViewModel | null = null;
|
||||
|
||||
present(dto: RaceWithSOFResultDTO): void {
|
||||
this.viewModel = {
|
||||
present(dto: RaceWithSOFResultDTO): RaceWithSOFViewModel {
|
||||
return {
|
||||
id: dto.raceId,
|
||||
leagueId: dto.leagueId,
|
||||
scheduledAt: dto.scheduledAt.toISOString(),
|
||||
@@ -24,12 +22,4 @@ export class RaceWithSOFPresenter implements IRaceWithSOFPresenter {
|
||||
participantCount: dto.participantCount,
|
||||
};
|
||||
}
|
||||
|
||||
getViewModel(): RaceWithSOFViewModel | null {
|
||||
return this.viewModel;
|
||||
}
|
||||
|
||||
reset(): void {
|
||||
this.viewModel = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user