This commit is contained in:
2025-12-16 21:05:01 +01:00
parent f61e3a4e5a
commit 7532c7ed6d
207 changed files with 7861 additions and 2606 deletions

View File

@@ -8,18 +8,18 @@ import type {
AllRacesFilterOptionsViewModel,
} from '../presenters/IAllRacesPagePresenter';
import type { AsyncUseCase } from '@core/shared/application';
import { Result } from '@core/shared/result/Result';
import { RacingDomainValidationError } from '../../domain/errors/RacingDomainError';
import { Result } from '@/shared/application/Result';
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
export class GetAllRacesPageDataUseCase
implements AsyncUseCase<void, Result<AllRacesPageResultDTO, RacingDomainValidationError>> {
implements AsyncUseCase<void, AllRacesPageResultDTO, string> {
constructor(
private readonly raceRepository: IRaceRepository,
private readonly leagueRepository: ILeagueRepository,
private readonly logger: Logger,
) {}
async execute(): Promise<Result<AllRacesPageResultDTO, RacingDomainValidationError>> {
async execute(): Promise<Result<AllRacesPageResultDTO, ApplicationErrorCode<string>>> {
this.logger.debug('Executing GetAllRacesPageDataUseCase');
try {
const [allRaces, allLeagues] = await Promise.all([