Skip to content
Snippets Groups Projects
Unverified Commit dee11612 authored by Nabilsenko's avatar Nabilsenko Committed by GitHub
Browse files

Merge pull request #19 from ivanalglave/updateNumEtu

fix: made numEtu optional
parents a6dcd224 97bb27d0
No related branches found
No related tags found
No related merge requests found
...@@ -2,9 +2,9 @@ import { IsBoolean, IsString, IsNotEmpty, IsOptional, IsNumber } from 'class-val ...@@ -2,9 +2,9 @@ import { IsBoolean, IsString, IsNotEmpty, IsOptional, IsNumber } from 'class-val
export class CreatePeopleDto { export class CreatePeopleDto {
@IsNumber() @IsString()
@IsNotEmpty() @IsOptional()
numetu: number; numetu: string;
@IsString() @IsString()
@IsNotEmpty() @IsNotEmpty()
......
...@@ -2,9 +2,9 @@ import { IsOptional, IsString, IsNotEmpty, IsNumber } from 'class-validator'; ...@@ -2,9 +2,9 @@ import { IsOptional, IsString, IsNotEmpty, IsNumber } from 'class-validator';
export class UpdatePeopleDto { export class UpdatePeopleDto {
@IsNumber() @IsString()
@IsNotEmpty() @IsOptional()
numetu: number; numetu: string;
@IsString() @IsString()
@IsOptional() @IsOptional()
......
...@@ -2,7 +2,7 @@ import { People } from '../schemas/people.schema'; ...@@ -2,7 +2,7 @@ import { People } from '../schemas/people.schema';
export class PeopleEntity { export class PeopleEntity {
_id: string; _id: string;
numetu: number; numetu: string;
firstname: string; firstname: string;
lastname: string; lastname: string;
email: string; email: string;
......
...@@ -20,9 +20,9 @@ export class People { ...@@ -20,9 +20,9 @@ export class People {
_id: any; _id: any;
@Prop({ @Prop({
type: Number, type: String,
required: true, trim: true,
}) numetu: number; }) numetu: string;
@Prop({ @Prop({
type: String, type: String,
......
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