refactor core presenters
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
import { DriverStatsDTO } from '../dtos/DriverStatsDTO';
|
||||
import type { ITotalDriversPresenter, TotalDriversResultDTO } from '../../../../../core/racing/application/presenters/ITotalDriversPresenter';
|
||||
import type { TotalDriversOutputPort } from '../../../../../core/racing/application/ports/output/TotalDriversOutputPort';
|
||||
|
||||
export class DriverStatsPresenter implements ITotalDriversPresenter {
|
||||
export class DriverStatsPresenter {
|
||||
private result: DriverStatsDTO | null = null;
|
||||
|
||||
reset() {
|
||||
this.result = null;
|
||||
}
|
||||
|
||||
present(dto: TotalDriversResultDTO) {
|
||||
present(output: TotalDriversOutputPort) {
|
||||
this.result = {
|
||||
totalDrivers: dto.totalDrivers,
|
||||
totalDrivers: output.totalDrivers,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user