18 lines
625 B
TypeScript
18 lines
625 B
TypeScript
import { IRejectLeagueJoinRequestPresenter, RejectLeagueJoinRequestResultDTO, RejectLeagueJoinRequestViewModel } from '@gridpilot/racing/application/presenters/IRejectLeagueJoinRequestPresenter';
|
|
|
|
export class RejectLeagueJoinRequestPresenter implements IRejectLeagueJoinRequestPresenter {
|
|
private result: RejectLeagueJoinRequestViewModel | null = null;
|
|
|
|
reset() {
|
|
this.result = null;
|
|
}
|
|
|
|
present(dto: RejectLeagueJoinRequestResultDTO) {
|
|
this.result = dto;
|
|
}
|
|
|
|
getViewModel(): RejectLeagueJoinRequestViewModel {
|
|
if (!this.result) throw new Error('Presenter not presented');
|
|
return this.result;
|
|
}
|
|
} |