refactor use cases
This commit is contained in:
@@ -17,6 +17,8 @@ describe('LeagueOwnerSummaryPresenter', () => {
|
||||
joinedAt: { toDate: () => new Date('2024-01-01T00:00:00Z') } as any,
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} as any,
|
||||
totalMembers: 50,
|
||||
activeMembers: 45,
|
||||
rating: 1500,
|
||||
rank: 100,
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import type { UseCaseOutputPort } from '@core/shared/application';
|
||||
import type { GetLeagueRosterMembersResult } from '@core/racing/application/use-cases/GetLeagueRosterMembersUseCase';
|
||||
import type { GetLeagueRosterJoinRequestsResult } from '@core/racing/application/use-cases/GetLeagueRosterJoinRequestsUseCase';
|
||||
@@ -5,6 +6,7 @@ import type { LeagueRosterMemberDTO } from '../dtos/LeagueRosterMemberDTO';
|
||||
import type { LeagueRosterJoinRequestDTO } from '../dtos/LeagueRosterJoinRequestDTO';
|
||||
import type { DriverDTO } from '../../driver/dtos/DriverDTO';
|
||||
|
||||
@Injectable()
|
||||
export class GetLeagueRosterMembersPresenter implements UseCaseOutputPort<GetLeagueRosterMembersResult> {
|
||||
private viewModel: LeagueRosterMemberDTO[] | null = null;
|
||||
|
||||
@@ -37,6 +39,7 @@ export class GetLeagueRosterMembersPresenter implements UseCaseOutputPort<GetLea
|
||||
}
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class GetLeagueRosterJoinRequestsPresenter implements UseCaseOutputPort<GetLeagueRosterJoinRequestsResult> {
|
||||
private viewModel: LeagueRosterJoinRequestDTO[] | null = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user