module cleanup
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { ITransferLeagueOwnershipPresenter, TransferLeagueOwnershipResultDTO, TransferLeagueOwnershipViewModel } from '@core/racing/application/presenters/ITransferLeagueOwnershipPresenter';
|
||||
|
||||
export class TransferLeagueOwnershipPresenter implements ITransferLeagueOwnershipPresenter {
|
||||
private result: TransferLeagueOwnershipViewModel | null = null;
|
||||
|
||||
reset() {
|
||||
this.result = null;
|
||||
}
|
||||
|
||||
present(dto: TransferLeagueOwnershipResultDTO): void {
|
||||
this.result = {
|
||||
success: dto.success,
|
||||
};
|
||||
}
|
||||
|
||||
getViewModel(): TransferLeagueOwnershipViewModel {
|
||||
if (!this.result) throw new Error('Presenter not presented');
|
||||
return this.result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user