Files
gridpilot.gg/apps/api/src/domain/league/presenters/TotalLeaguesPresenter.ts
2025-12-19 19:42:19 +01:00

20 lines
489 B
TypeScript

import { GetTotalLeaguesOutputPort } from '@core/racing/application/ports/output/GetTotalLeaguesOutputPort';
import { TotalLeaguesDTO } from '../dtos/TotalLeaguesDTO';
export class TotalLeaguesPresenter {
private result: TotalLeaguesDTO | null = null;
reset() {
this.result = null;
}
present(output: GetTotalLeaguesOutputPort) {
this.result = {
totalLeagues: output.totalLeagues,
};
}
getViewModel(): TotalLeaguesDTO | null {
return this.result;
}
}