presenter refactoring

This commit is contained in:
2025-12-20 17:06:11 +01:00
parent 92be9d2e1b
commit e9d6f90bb2
109 changed files with 4159 additions and 1283 deletions

View File

@@ -1,9 +1,21 @@
import type { JoinLeagueOutputPort } from '@core/racing/application/ports/output/JoinLeagueOutputPort';
import type { JoinLeagueOutputDTO } from '../dtos/JoinLeagueOutputDTO';
export function mapJoinLeagueOutputPortToDTO(port: JoinLeagueOutputPort): JoinLeagueOutputDTO {
return {
success: true,
membershipId: port.membershipId,
};
export class JoinLeaguePresenter {
private result: JoinLeagueOutputDTO | null = null;
reset() {
this.result = null;
}
present(output: JoinLeagueOutputPort) {
this.result = {
success: true,
membershipId: output.membershipId,
};
}
getViewModel(): JoinLeagueOutputDTO | null {
return this.result;
}
}