refactor core presenters

This commit is contained in:
2025-12-19 19:42:19 +01:00
parent 8116fe888f
commit 94fc538f44
228 changed files with 2817 additions and 3097 deletions

View File

@@ -1,20 +1,20 @@
import { IGetTotalLeaguesPresenter, GetTotalLeaguesResultDTO, GetTotalLeaguesViewModel } from '@core/racing/application/presenters/IGetTotalLeaguesPresenter';
import { LeagueStatsDTO } from '../dtos/LeagueStatsDTO';
import { GetTotalLeaguesOutputPort } from '@core/racing/application/ports/output/GetTotalLeaguesOutputPort';
import { TotalLeaguesDTO } from '../dtos/TotalLeaguesDTO';
export class TotalLeaguesPresenter implements IGetTotalLeaguesPresenter {
private result: LeagueStatsDto | null = null;
export class TotalLeaguesPresenter {
private result: TotalLeaguesDTO | null = null;
reset() {
this.result = null;
}
present(dto: GetTotalLeaguesResultDTO) {
present(output: GetTotalLeaguesOutputPort) {
this.result = {
totalLeagues: dto.totalLeagues,
totalLeagues: output.totalLeagues,
};
}
getViewModel(): LeagueStatsDto | null {
getViewModel(): TotalLeaguesDTO | null {
return this.result;
}
}