18 lines
631 B
TypeScript
18 lines
631 B
TypeScript
import { IApproveLeagueJoinRequestPresenter, ApproveLeagueJoinRequestResultPort, ApproveLeagueJoinRequestViewModel } from '@core/racing/application/presenters/IApproveLeagueJoinRequestPresenter';
|
|
|
|
export class ApproveLeagueJoinRequestPresenter implements IApproveLeagueJoinRequestPresenter {
|
|
private result: ApproveLeagueJoinRequestViewModel | null = null;
|
|
|
|
reset() {
|
|
this.result = null;
|
|
}
|
|
|
|
present(dto: ApproveLeagueJoinRequestResultPort) {
|
|
this.result = dto;
|
|
}
|
|
|
|
getViewModel(): ApproveLeagueJoinRequestViewModel {
|
|
if (!this.result) throw new Error('Presenter not presented');
|
|
return this.result;
|
|
}
|
|
} |