presenter refactoring

This commit is contained in:
2025-12-20 17:06:11 +01:00
parent 92be9d2e1b
commit e9d6f90bb2
109 changed files with 4159 additions and 1283 deletions

View File

@@ -1,7 +1,6 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsDate, IsOptional, ValidateNested } from 'class-validator';
import { IsString, IsDate, IsOptional } from 'class-validator';
import { Type } from 'class-transformer';
import { DriverDto } from '../../driver/dto/DriverDto';
export class LeagueJoinRequestDTO {
@ApiProperty()
@@ -26,9 +25,13 @@ export class LeagueJoinRequestDTO {
@IsString()
message?: string;
@ApiProperty({ type: () => DriverDto, required: false })
@ApiProperty({
required: false,
type: () => Object,
})
@IsOptional()
@ValidateNested()
@Type(() => DriverDto)
driver?: DriverDto;
driver?: {
id: string;
name: string;
};
}

View File

@@ -1,8 +1,13 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsBoolean } from 'class-validator';
import { IsBoolean, IsOptional, IsString } from 'class-validator';
export class RemoveLeagueMemberOutputDTO {
@ApiProperty()
@IsBoolean()
success: boolean;
@ApiProperty({ required: false })
@IsOptional()
@IsString()
error?: string;
}

View File

@@ -1,8 +1,13 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsBoolean } from 'class-validator';
import { IsBoolean, IsOptional, IsString } from 'class-validator';
export class UpdateLeagueMemberRoleOutputDTO {
@ApiProperty()
@IsBoolean()
success: boolean;
@ApiProperty({ required: false })
@IsOptional()
@IsString()
error?: string;
}