website refactor
This commit is contained in:
@@ -3,14 +3,14 @@ import 'reflect-metadata';
|
||||
import { Reflector } from '@nestjs/core';
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import request from 'supertest';
|
||||
import { RaceController } from './RaceController';
|
||||
import { RaceService } from './RaceService';
|
||||
import { vi, Mocked } from 'vitest';
|
||||
import { Mocked, vi } from 'vitest';
|
||||
import { AuthenticationGuard } from '../auth/AuthenticationGuard';
|
||||
import { AuthorizationGuard } from '../auth/AuthorizationGuard';
|
||||
import type { AuthorizationService } from '../auth/AuthorizationService';
|
||||
import { FeatureAvailabilityGuard } from '../policy/FeatureAvailabilityGuard';
|
||||
import type { PolicyService, PolicySnapshot } from '../policy/PolicyService';
|
||||
import { RaceController } from './RaceController';
|
||||
import { RaceService } from './RaceService';
|
||||
|
||||
describe('RaceController', () => {
|
||||
let controller: RaceController;
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
import { Body, Controller, Get, HttpCode, HttpStatus, InternalServerErrorException, Param, Post, Query, Inject } from '@nestjs/common';
|
||||
import { Body, Controller, Get, HttpCode, HttpStatus, Inject, InternalServerErrorException, Param, Post, Query } from '@nestjs/common';
|
||||
import { ApiOperation, ApiParam, ApiQuery, ApiResponse, ApiTags } from '@nestjs/swagger';
|
||||
import { Public } from '../auth/Public';
|
||||
import { RaceService } from './RaceService';
|
||||
import { AllRacesPageDTO } from './dtos/AllRacesPageDTO';
|
||||
import { RaceStatsDTO } from './dtos/RaceStatsDTO';
|
||||
import { RaceDetailDTO } from './dtos/RaceDetailDTO';
|
||||
import { RacesPageDataDTO } from './dtos/RacesPageDataDTO';
|
||||
import { RaceResultsDetailDTO } from './dtos/RaceResultsDetailDTO';
|
||||
import { RaceWithSOFDTO } from './dtos/RaceWithSOFDTO';
|
||||
import { RaceProtestsDTO } from './dtos/RaceProtestsDTO';
|
||||
import { RacePenaltiesDTO } from './dtos/RacePenaltiesDTO';
|
||||
import { RegisterForRaceParamsDTO } from './dtos/RegisterForRaceParamsDTO';
|
||||
import { WithdrawFromRaceParamsDTO } from './dtos/WithdrawFromRaceParamsDTO';
|
||||
import { ApplyPenaltyCommandDTO } from './dtos/ApplyPenaltyCommandDTO';
|
||||
import { FileProtestCommandDTO } from './dtos/FileProtestCommandDTO';
|
||||
import { ImportRaceResultsDTO } from './dtos/ImportRaceResultsDTO';
|
||||
import { ImportRaceResultsSummaryDTO } from './dtos/ImportRaceResultsSummaryDTO';
|
||||
import { FileProtestCommandDTO } from './dtos/FileProtestCommandDTO';
|
||||
import { QuickPenaltyCommandDTO } from './dtos/QuickPenaltyCommandDTO';
|
||||
import { ApplyPenaltyCommandDTO } from './dtos/ApplyPenaltyCommandDTO';
|
||||
import { RequestProtestDefenseCommandDTO } from './dtos/RequestProtestDefenseCommandDTO';
|
||||
import { PenaltyTypesReferenceDTO } from './dtos/PenaltyTypesReferenceDTO';
|
||||
import { QuickPenaltyCommandDTO } from './dtos/QuickPenaltyCommandDTO';
|
||||
import { RaceDetailDTO } from './dtos/RaceDetailDTO';
|
||||
import { RacePenaltiesDTO } from './dtos/RacePenaltiesDTO';
|
||||
import { RaceProtestsDTO } from './dtos/RaceProtestsDTO';
|
||||
import { RaceResultsDetailDTO } from './dtos/RaceResultsDetailDTO';
|
||||
import { RaceStatsDTO } from './dtos/RaceStatsDTO';
|
||||
import { RaceWithSOFDTO } from './dtos/RaceWithSOFDTO';
|
||||
import { RacesPageDataDTO } from './dtos/RacesPageDataDTO';
|
||||
import { RegisterForRaceParamsDTO } from './dtos/RegisterForRaceParamsDTO';
|
||||
import { RequestProtestDefenseCommandDTO } from './dtos/RequestProtestDefenseCommandDTO';
|
||||
import { WithdrawFromRaceParamsDTO } from './dtos/WithdrawFromRaceParamsDTO';
|
||||
|
||||
@ApiTags('races')
|
||||
@Controller('races')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Test, TestingModule } from '@nestjs/testing';
|
||||
import { RaceModule } from './RaceModule';
|
||||
import { RaceController } from './RaceController';
|
||||
import { RaceModule } from './RaceModule';
|
||||
import { RaceService } from './RaceService';
|
||||
|
||||
describe('RaceModule', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { RacingPersistenceModule } from '../../persistence/racing/RacingPersistenceModule';
|
||||
import { RaceService } from './RaceService';
|
||||
import { RaceController } from './RaceController';
|
||||
import { RaceProviders } from './RaceProviders';
|
||||
import { RaceService } from './RaceService';
|
||||
|
||||
@Module({
|
||||
imports: [RacingPersistenceModule],
|
||||
|
||||
@@ -55,29 +55,29 @@ import { RacesPageDataPresenter } from './presenters/RacesPageDataPresenter';
|
||||
import { RaceWithSOFPresenter } from './presenters/RaceWithSOFPresenter';
|
||||
|
||||
import {
|
||||
RACE_REPOSITORY_TOKEN,
|
||||
LEAGUE_REPOSITORY_TOKEN,
|
||||
DRIVER_REPOSITORY_TOKEN,
|
||||
RACE_REGISTRATION_REPOSITORY_TOKEN,
|
||||
RESULT_REPOSITORY_TOKEN,
|
||||
LEAGUE_MEMBERSHIP_REPOSITORY_TOKEN,
|
||||
PENALTY_REPOSITORY_TOKEN,
|
||||
PROTEST_REPOSITORY_TOKEN,
|
||||
STANDING_REPOSITORY_TOKEN,
|
||||
DRIVER_RATING_PROVIDER_TOKEN,
|
||||
IMAGE_SERVICE_TOKEN,
|
||||
LOGGER_TOKEN,
|
||||
GET_ALL_RACES_PRESENTER_TOKEN,
|
||||
GET_TOTAL_RACES_PRESENTER_TOKEN,
|
||||
IMPORT_RACE_RESULTS_API_PRESENTER_TOKEN,
|
||||
RACE_DETAIL_PRESENTER_TOKEN,
|
||||
RACES_PAGE_DATA_PRESENTER_TOKEN,
|
||||
ALL_RACES_PAGE_DATA_PRESENTER_TOKEN,
|
||||
RACE_RESULTS_DETAIL_PRESENTER_TOKEN,
|
||||
RACE_WITH_SOF_PRESENTER_TOKEN,
|
||||
RACE_PROTESTS_PRESENTER_TOKEN,
|
||||
RACE_PENALTIES_PRESENTER_TOKEN,
|
||||
COMMAND_RESULT_PRESENTER_TOKEN,
|
||||
ALL_RACES_PAGE_DATA_PRESENTER_TOKEN,
|
||||
COMMAND_RESULT_PRESENTER_TOKEN,
|
||||
DRIVER_RATING_PROVIDER_TOKEN,
|
||||
DRIVER_REPOSITORY_TOKEN,
|
||||
GET_ALL_RACES_PRESENTER_TOKEN,
|
||||
GET_TOTAL_RACES_PRESENTER_TOKEN,
|
||||
IMAGE_SERVICE_TOKEN,
|
||||
IMPORT_RACE_RESULTS_API_PRESENTER_TOKEN,
|
||||
LEAGUE_MEMBERSHIP_REPOSITORY_TOKEN,
|
||||
LEAGUE_REPOSITORY_TOKEN,
|
||||
LOGGER_TOKEN,
|
||||
PENALTY_REPOSITORY_TOKEN,
|
||||
PROTEST_REPOSITORY_TOKEN,
|
||||
RACE_DETAIL_PRESENTER_TOKEN,
|
||||
RACE_PENALTIES_PRESENTER_TOKEN,
|
||||
RACE_PROTESTS_PRESENTER_TOKEN,
|
||||
RACE_REGISTRATION_REPOSITORY_TOKEN,
|
||||
RACE_REPOSITORY_TOKEN,
|
||||
RACE_RESULTS_DETAIL_PRESENTER_TOKEN,
|
||||
RACE_WITH_SOF_PRESENTER_TOKEN,
|
||||
RACES_PAGE_DATA_PRESENTER_TOKEN,
|
||||
RESULT_REPOSITORY_TOKEN,
|
||||
STANDING_REPOSITORY_TOKEN,
|
||||
} from './RaceTokens';
|
||||
|
||||
export * from './RaceTokens';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
import { describe, expect, it, vi, type Mock } from 'vitest';
|
||||
import { RaceService } from './RaceService';
|
||||
import { Result } from '@core/shared/domain/Result';
|
||||
|
||||
describe('RaceService', () => {
|
||||
it('invokes each use case and returns the corresponding presenter', async () => {
|
||||
|
||||
@@ -47,34 +47,34 @@ import { RaceWithSOFPresenter } from './presenters/RaceWithSOFPresenter';
|
||||
// Command DTOs
|
||||
import { ApplyPenaltyCommandDTO } from './dtos/ApplyPenaltyCommandDTO';
|
||||
import { FileProtestCommandDTO } from './dtos/FileProtestCommandDTO';
|
||||
import { PenaltyTypesReferenceDTO } from './dtos/PenaltyTypesReferenceDTO';
|
||||
import { QuickPenaltyCommandDTO } from './dtos/QuickPenaltyCommandDTO';
|
||||
import { RequestProtestDefenseCommandDTO } from './dtos/RequestProtestDefenseCommandDTO';
|
||||
import { ReviewProtestCommandDTO } from './dtos/ReviewProtestCommandDTO';
|
||||
import { PenaltyTypesReferenceDTO } from './dtos/PenaltyTypesReferenceDTO';
|
||||
|
||||
// Tokens
|
||||
import { ApplyPenaltyUseCase } from '@core/racing/application/use-cases/ApplyPenaltyUseCase';
|
||||
import {
|
||||
ALL_RACES_PAGE_DATA_PRESENTER_TOKEN,
|
||||
COMMAND_RESULT_PRESENTER_TOKEN,
|
||||
GET_ALL_RACES_PRESENTER_TOKEN,
|
||||
GET_TOTAL_RACES_PRESENTER_TOKEN,
|
||||
IMPORT_RACE_RESULTS_API_PRESENTER_TOKEN,
|
||||
LOGGER_TOKEN,
|
||||
RACE_DETAIL_PRESENTER_TOKEN,
|
||||
RACE_PENALTIES_PRESENTER_TOKEN,
|
||||
RACE_PROTESTS_PRESENTER_TOKEN,
|
||||
RACE_RESULTS_DETAIL_PRESENTER_TOKEN,
|
||||
RACE_WITH_SOF_PRESENTER_TOKEN,
|
||||
RACES_PAGE_DATA_PRESENTER_TOKEN
|
||||
ALL_RACES_PAGE_DATA_PRESENTER_TOKEN,
|
||||
COMMAND_RESULT_PRESENTER_TOKEN,
|
||||
GET_ALL_RACES_PRESENTER_TOKEN,
|
||||
GET_TOTAL_RACES_PRESENTER_TOKEN,
|
||||
IMPORT_RACE_RESULTS_API_PRESENTER_TOKEN,
|
||||
LOGGER_TOKEN,
|
||||
RACE_DETAIL_PRESENTER_TOKEN,
|
||||
RACE_PENALTIES_PRESENTER_TOKEN,
|
||||
RACE_PROTESTS_PRESENTER_TOKEN,
|
||||
RACE_RESULTS_DETAIL_PRESENTER_TOKEN,
|
||||
RACE_WITH_SOF_PRESENTER_TOKEN,
|
||||
RACES_PAGE_DATA_PRESENTER_TOKEN
|
||||
} from './RaceTokens';
|
||||
|
||||
import {
|
||||
PENALTY_TYPE_VALUES,
|
||||
getPenaltyValueKind,
|
||||
type PenaltyTypeValue,
|
||||
} from '@core/racing/domain/entities/penalty/PenaltyType';
|
||||
import { penaltyTypeRequiresValue } from '@core/racing/domain/entities/penalty/Penalty';
|
||||
import {
|
||||
getPenaltyValueKind,
|
||||
PENALTY_TYPE_VALUES,
|
||||
type PenaltyTypeValue,
|
||||
} from '@core/racing/domain/entities/penalty/PenaltyType';
|
||||
|
||||
@Injectable()
|
||||
export class RaceService {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNotEmpty, IsOptional, IsNumber, IsEnum } from 'class-validator';
|
||||
import { PENALTY_TYPE_VALUES } from '@core/racing/domain/entities/penalty/PenaltyType';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsEnum, IsNotEmpty, IsNumber, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export class ApplyPenaltyCommandDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNumber, IsOptional } from 'class-validator';
|
||||
import { IsNumber, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export class DashboardDriverSummaryDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsOptional } from 'class-validator';
|
||||
import { IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export type DashboardFeedItemType =
|
||||
| 'friend-joined-league'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNumber } from 'class-validator';
|
||||
import { IsNumber, IsString } from 'class-validator';
|
||||
|
||||
export class DashboardLeagueStandingSummaryDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsNumber } from 'class-validator';
|
||||
import { DashboardDriverSummaryDTO } from './DashboardDriverSummaryDTO';
|
||||
import { DashboardRaceSummaryDTO } from './DashboardRaceSummaryDTO';
|
||||
import { DashboardRecentResultDTO } from './DashboardRecentResultDTO';
|
||||
import { DashboardLeagueStandingSummaryDTO } from './DashboardLeagueStandingSummaryDTO';
|
||||
import { DashboardFeedSummaryDTO } from './DashboardFeedSummaryDTO';
|
||||
import { DashboardFriendSummaryDTO } from './DashboardFriendSummaryDTO';
|
||||
import { DashboardLeagueStandingSummaryDTO } from './DashboardLeagueStandingSummaryDTO';
|
||||
import { DashboardRaceSummaryDTO } from './DashboardRaceSummaryDTO';
|
||||
import { DashboardRecentResultDTO } from './DashboardRecentResultDTO';
|
||||
|
||||
export class DashboardOverviewDTO {
|
||||
@ApiProperty({ nullable: true })
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsBoolean } from 'class-validator';
|
||||
import { IsBoolean, IsString } from 'class-validator';
|
||||
|
||||
export class DashboardRaceSummaryDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNumber } from 'class-validator';
|
||||
import { IsNumber, IsString } from 'class-validator';
|
||||
|
||||
export class DashboardRecentResultDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNumber, IsOptional } from 'class-validator';
|
||||
import { IsNumber, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export class DriverSummaryDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsNotEmpty, IsOptional, IsString, IsUrl, ValidateNested } from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { IsNotEmpty, IsOptional, IsString, IsUrl, ValidateNested } from 'class-validator';
|
||||
import { ProtestIncidentDTO } from './ProtestIncidentDTO';
|
||||
|
||||
export class FileProtestCommandDTO {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiPropertyOptional, ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNotEmpty, IsOptional } from 'class-validator';
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
|
||||
import { IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export class GetRaceDetailParamsDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNotEmpty } from 'class-validator';
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class ImportRaceResultsDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsBoolean, IsString, IsNumber } from 'class-validator';
|
||||
import { IsBoolean, IsNumber, IsString } from 'class-validator';
|
||||
|
||||
export class ImportRaceResultsSummaryDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
PENALTY_TYPE_VALUES,
|
||||
type PenaltyTypeValue,
|
||||
} from '@core/racing/domain/entities/penalty/PenaltyType';
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsBoolean, IsEnum, IsString } from 'class-validator';
|
||||
import {
|
||||
PENALTY_TYPE_VALUES,
|
||||
type PenaltyTypeValue,
|
||||
} from '@core/racing/domain/entities/penalty/PenaltyType';
|
||||
|
||||
export type PenaltyValueKindDTO = 'seconds' | 'grid_positions' | 'points' | 'races' | 'none';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNotEmpty, IsOptional, IsEnum } from 'class-validator';
|
||||
import { IsEnum, IsNotEmpty, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export class QuickPenaltyCommandDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNotEmpty } from 'class-validator';
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class RaceActionParamsDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsOptional, IsString } from 'class-validator';
|
||||
import { RaceDetailRaceDTO } from './RaceDetailRaceDTO';
|
||||
import { RaceDetailLeagueDTO } from './RaceDetailLeagueDTO';
|
||||
import { RaceDetailEntryDTO } from './RaceDetailEntryDTO';
|
||||
import { RaceDetailLeagueDTO } from './RaceDetailLeagueDTO';
|
||||
import { RaceDetailRaceDTO } from './RaceDetailRaceDTO';
|
||||
import { RaceDetailRegistrationDTO } from './RaceDetailRegistrationDTO';
|
||||
import { RaceDetailUserResultDTO } from './RaceDetailUserResultDTO';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsBoolean } from 'class-validator';
|
||||
import { IsBoolean, IsString } from 'class-validator';
|
||||
|
||||
export class RaceDetailEntryDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsOptional, IsNumber } from 'class-validator';
|
||||
import { IsNumber, IsOptional, IsString } from 'class-validator';
|
||||
|
||||
export class RaceDetailRaceDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsNumber, IsBoolean } from 'class-validator';
|
||||
import { IsBoolean, IsNumber } from 'class-validator';
|
||||
|
||||
export class RaceDetailUserResultDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNumber } from 'class-validator';
|
||||
import { IsNumber, IsString } from 'class-validator';
|
||||
|
||||
export class RacePenaltyDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNumber, IsBoolean } from 'class-validator';
|
||||
import { IsBoolean, IsNumber, IsString } from 'class-validator';
|
||||
|
||||
export class RaceResultDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsBoolean } from 'class-validator';
|
||||
import { IsBoolean, IsString } from 'class-validator';
|
||||
|
||||
export class RacesPageDataRaceDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNotEmpty } from 'class-validator';
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class RegisterForRaceParamsDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNotEmpty } from 'class-validator';
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class RequestProtestDefenseCommandDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNotEmpty, IsEnum } from 'class-validator';
|
||||
import { IsEnum, IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class ReviewProtestCommandDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ApiProperty } from '@nestjs/swagger';
|
||||
import { IsString, IsNotEmpty } from 'class-validator';
|
||||
import { IsNotEmpty, IsString } from 'class-validator';
|
||||
|
||||
export class WithdrawFromRaceParamsDTO {
|
||||
@ApiProperty()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { AllRacesPageDataPresenter } from './AllRacesPageDataPresenter';
|
||||
import type { GetAllRacesPageDataResult } from '@core/racing/application/use-cases/GetAllRacesPageDataUseCase';
|
||||
import { AllRacesPageDataPresenter } from './AllRacesPageDataPresenter';
|
||||
|
||||
describe('AllRacesPageDataPresenter', () => {
|
||||
let presenter: AllRacesPageDataPresenter;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { GetAllRacesPresenter } from './GetAllRacesPresenter';
|
||||
import type { GetAllRacesResult } from '@core/racing/application/use-cases/GetAllRacesUseCase';
|
||||
import { GetAllRacesPresenter } from './GetAllRacesPresenter';
|
||||
|
||||
describe('GetAllRacesPresenter', () => {
|
||||
it('should map races and distinct leagues into the DTO', async () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { GetTotalRacesPresenter } from './GetTotalRacesPresenter';
|
||||
import type { GetTotalRacesResult } from '@core/racing/application/use-cases/GetTotalRacesUseCase';
|
||||
import { GetTotalRacesPresenter } from './GetTotalRacesPresenter';
|
||||
|
||||
describe('GetTotalRacesPresenter', () => {
|
||||
let presenter: GetTotalRacesPresenter;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ImportRaceResultsApiPresenter } from './ImportRaceResultsApiPresenter';
|
||||
import type { ImportRaceResultsApiResult } from '@core/racing/application/use-cases/ImportRaceResultsApiUseCase';
|
||||
import { ImportRaceResultsApiPresenter } from './ImportRaceResultsApiPresenter';
|
||||
|
||||
describe('ImportRaceResultsApiPresenter', () => {
|
||||
let presenter: ImportRaceResultsApiPresenter;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { GetRaceDetailResult } from '@core/racing/application/use-cases/GetRaceDetailUseCase';
|
||||
import type { DriverRatingProvider } from '@core/racing/application/ports/DriverRatingProvider';
|
||||
import type { IImageServicePort } from '@core/racing/application/ports/ImageServicePort';
|
||||
import type { GetRaceDetailResult } from '@core/racing/application/use-cases/GetRaceDetailUseCase';
|
||||
import type { GetRaceDetailParamsDTO } from '../dtos/GetRaceDetailParamsDTO';
|
||||
import type { RaceDetailDTO } from '../dtos/RaceDetailDTO';
|
||||
import type { RaceDetailRaceDTO } from '../dtos/RaceDetailRaceDTO';
|
||||
import type { RaceDetailLeagueDTO } from '../dtos/RaceDetailLeagueDTO';
|
||||
import type { RaceDetailEntryDTO } from '../dtos/RaceDetailEntryDTO';
|
||||
import type { RaceDetailLeagueDTO } from '../dtos/RaceDetailLeagueDTO';
|
||||
import type { RaceDetailRaceDTO } from '../dtos/RaceDetailRaceDTO';
|
||||
import type { RaceDetailRegistrationDTO } from '../dtos/RaceDetailRegistrationDTO';
|
||||
import type { RaceDetailUserResultDTO } from '../dtos/RaceDetailUserResultDTO';
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RacePenaltiesPresenter } from './RacePenaltiesPresenter';
|
||||
import type { GetRacePenaltiesResult } from '@core/racing/application/use-cases/GetRacePenaltiesUseCase';
|
||||
import { RacePenaltiesPresenter } from './RacePenaltiesPresenter';
|
||||
|
||||
describe('RacePenaltiesPresenter', () => {
|
||||
let presenter: RacePenaltiesPresenter;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { RaceProtestsPresenter } from './RaceProtestsPresenter';
|
||||
import type { GetRaceProtestsResult } from '@core/racing/application/use-cases/GetRaceProtestsUseCase';
|
||||
import { RaceProtestsPresenter } from './RaceProtestsPresenter';
|
||||
|
||||
describe('RaceProtestsPresenter', () => {
|
||||
let presenter: RaceProtestsPresenter;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { GetRaceProtestsResult } from '@core/racing/application/use-cases/GetRaceProtestsUseCase';
|
||||
import type { RaceProtestsDTO } from '../dtos/RaceProtestsDTO';
|
||||
import type { RaceProtestDTO } from '../dtos/RaceProtestDTO';
|
||||
import type { RaceProtestsDTO } from '../dtos/RaceProtestsDTO';
|
||||
|
||||
export type GetRaceProtestsResponseModel = RaceProtestsDTO;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import type {
|
||||
GetRaceResultsDetailResult,
|
||||
GetRaceResultsDetailErrorCode,
|
||||
} from '@core/racing/application/use-cases/GetRaceResultsDetailUseCase';
|
||||
import type { IImageServicePort } from '@core/racing/application/ports/ImageServicePort';
|
||||
import type { RaceResultsDetailDTO } from '../dtos/RaceResultsDetailDTO';
|
||||
import type {
|
||||
GetRaceResultsDetailErrorCode,
|
||||
GetRaceResultsDetailResult,
|
||||
} from '@core/racing/application/use-cases/GetRaceResultsDetailUseCase';
|
||||
import type { ApplicationErrorCode } from '@core/shared/errors/ApplicationErrorCode';
|
||||
import type { RaceResultDTO } from '../dtos/RaceResultDTO';
|
||||
import type { RaceResultsDetailDTO } from '../dtos/RaceResultsDetailDTO';
|
||||
|
||||
export type GetRaceResultsDetailResponseModel = RaceResultsDetailDTO;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user