This commit is contained in:
2025-12-11 00:57:32 +01:00
parent 1303a14493
commit 6a427eab57
112 changed files with 6148 additions and 2272 deletions

View File

@@ -0,0 +1,22 @@
import type { IStandingRepository } from '../../domain/repositories/IStandingRepository';
import type { ILeagueStandingsPresenter } from '../presenters/ILeagueStandingsPresenter';
export interface GetLeagueStandingsUseCaseParams {
leagueId: string;
}
/**
* Use Case for retrieving league standings.
* Orchestrates domain logic and delegates presentation to the presenter.
*/
export class GetLeagueStandingsUseCase {
constructor(
private readonly standingRepository: IStandingRepository,
public readonly presenter: ILeagueStandingsPresenter,
) {}
async execute(params: GetLeagueStandingsUseCaseParams): Promise<void> {
const standings = await this.standingRepository.findByLeagueId(params.leagueId);
this.presenter.present(standings);
}
}