Skip to content
Snippets Groups Projects
Commit a1b8b9e9 authored by L4168's avatar L4168
Browse files

added center validation to DTO

parent e5a62911
No related branches found
No related tags found
4 merge requests!59Development to master,!31Development,!26Piirto2,!25Dto service
......@@ -4,8 +4,10 @@ import {
Length,
IsDateString,
IsNumber,
Validate,
} from 'class-validator';
import { ObjectivePointEntity } from './game.entity';
import { CenterJSON } from '../shared/custom-validation';
export class GameDTO {
@IsString()
......@@ -16,6 +18,7 @@ export class GameDTO {
@Length(1, 255)
desc: string;
@IsNotEmpty()
@Validate(CenterJSON)
center: JSON;
map?: JSON;
nodesettings?: JSON;
......@@ -39,6 +42,7 @@ export class newGameDTO {
@Length(1, 255)
desc: string;
@IsNotEmpty()
@Validate(CenterJSON)
center: JSON;
@IsDateString()
@IsNotEmpty()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment