website refactor
This commit is contained in:
@@ -13,19 +13,20 @@ export type GetRaceDetailResponseModel = RaceDetailDTO;
|
||||
|
||||
export class RaceDetailPresenter {
|
||||
private result: GetRaceDetailResult | null = null;
|
||||
private params: GetRaceDetailParamsDTO | null = null;
|
||||
|
||||
constructor(
|
||||
private readonly driverRatingProvider: DriverRatingProvider,
|
||||
private readonly imageService: ImageServicePort,
|
||||
private readonly params: GetRaceDetailParamsDTO,
|
||||
) {}
|
||||
|
||||
present(result: GetRaceDetailResult): void {
|
||||
present(result: GetRaceDetailResult, params: GetRaceDetailParamsDTO): void {
|
||||
this.result = result;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
async getResponseModel(): Promise<GetRaceDetailResponseModel | null> {
|
||||
if (!this.result) {
|
||||
if (!this.result || !this.params) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user