website cleanup

This commit is contained in:
2025-12-24 21:44:58 +01:00
parent 9b683a59d3
commit d78854a4c6
277 changed files with 6141 additions and 2693 deletions

View File

@@ -1,5 +1,7 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNotEmpty, IsOptional, IsUrl } from 'class-validator';
import { IsNotEmpty, IsOptional, IsString, IsUrl, ValidateNested } from 'class-validator';
import { Type } from 'class-transformer';
import { ProtestIncidentDTO } from './ProtestIncidentDTO';
export class FileProtestCommandDTO {
@ApiProperty()
@@ -18,11 +20,9 @@ export class FileProtestCommandDTO {
accusedDriverId!: string;
@ApiProperty()
incident!: {
lap: number;
description: string;
timeInRace?: number;
};
@ValidateNested()
@Type(() => ProtestIncidentDTO)
incident!: ProtestIncidentDTO;
@ApiProperty({ required: false })
@IsOptional()
@@ -34,4 +34,4 @@ export class FileProtestCommandDTO {
@IsString()
@IsUrl()
proofVideoUrl?: string;
}
}

View File

@@ -0,0 +1,21 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsInt, IsNotEmpty, IsOptional, IsString, Min } from 'class-validator';
export class ProtestIncidentDTO {
@ApiProperty()
@IsInt()
@Min(0)
lap!: number;
@ApiProperty()
@IsString()
@IsNotEmpty()
description!: string;
@ApiProperty({ required: false, description: 'Seconds from race start' })
@IsOptional()
@IsInt()
@Min(0)
timeInRace?: number;
}