20 lines
489 B
TypeScript
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;
|
|
}
|
|
} |