Skip to content

Commit

Permalink
fix(backend): Make PollEvent note optional
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed May 8, 2024
1 parent 20ca6de commit 4158156
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libs/types/src/lib/schema/poll-event.schema.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Ref} from '@mean-stream/nestx/ref';
import {Prop, Schema, SchemaFactory} from '@nestjs/mongoose';
import {ApiProperty} from '@nestjs/swagger';
import {IsDate, IsString} from 'class-validator';
import {IsDate, IsOptional, IsString} from 'class-validator';
import {Types} from 'mongoose';

import {Poll} from './poll.schema';
Expand All @@ -28,8 +28,9 @@ export class PollEvent {
end: Date;

@Prop()
@IsOptional()
@IsString()
note: string;
note?: string;
}

export const PollEventSchema = SchemaFactory.createForClass(PollEvent);

0 comments on commit 4158156

Please sign in to comment.