mirror of
https://gitlab.com/mobicoop/v3/service/matcher.git
synced 2026-01-01 16:02:40 +00:00
wip
This commit is contained in:
@@ -8,10 +8,12 @@ import {
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
ValidateNested,
|
||||
} from 'class-validator';
|
||||
import { PointType } from '../../../geography/domain/types/point-type.enum';
|
||||
import { Frequency } from '../types/frequency.enum';
|
||||
import { Coordinates } from '../../../geography/domain/types/coordinates.type';
|
||||
import { Type } from 'class-transformer';
|
||||
|
||||
export class CreateAdRequest {
|
||||
@IsString()
|
||||
@@ -112,7 +114,9 @@ export class CreateAdRequest {
|
||||
destinationType: PointType;
|
||||
|
||||
@IsArray()
|
||||
@ValidateNested({ each: true })
|
||||
@ArrayMinSize(2)
|
||||
@Type(() => Coordinates)
|
||||
@AutoMap(() => [Coordinates])
|
||||
waypoints: Coordinates[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user