website refactor
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { Team } from '@/racing/domain/entities/Team';
|
||||
import { Team } from '../../domain/entities/Team';
|
||||
import type { Logger } from '@core/shared/domain/Logger';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import { TeamRepository } from '../../domain/repositories/TeamRepository';
|
||||
import { TeamMembershipRepository } from '../../domain/repositories/TeamMembershipRepository';
|
||||
import { TeamStatsRepository } from '../../domain/repositories/TeamStatsRepository';
|
||||
|
||||
export interface GetAllTeamsInput {}
|
||||
|
||||
@@ -39,6 +42,7 @@ export class GetAllTeamsUseCase {
|
||||
async execute(
|
||||
_input: GetAllTeamsInput,
|
||||
): Promise<Result<GetAllTeamsResult, ApplicationErrorCode<GetAllTeamsErrorCode, { message: string }>>> {
|
||||
void _input;
|
||||
this.logger.debug('GetAllTeamsUseCase: Fetching all teams');
|
||||
|
||||
try {
|
||||
@@ -71,7 +75,7 @@ export class GetAllTeamsUseCase {
|
||||
rating: stats?.rating ?? 0,
|
||||
logoUrl: logoUrl ?? null,
|
||||
description: team.description.toString(),
|
||||
leagues: team.leagues.map(l => l.toString()),
|
||||
leagues: team.leagues.map((l) => l.toString()),
|
||||
isRecruiting: team.isRecruiting,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user