From ac89e3aaffd921a2cd6c0a62871b2ba8954aac06 Mon Sep 17 00:00:00 2001 From: Rubin shrestha <72143629+byteglory@users.noreply.github.com> Date: Fri, 2 Oct 2020 00:57:01 +0545 Subject: [PATCH 1/2] Update create-comment.ts --- src/article/dto/create-comment.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/article/dto/create-comment.ts b/src/article/dto/create-comment.ts index cd365c0f..e29b969f 100644 --- a/src/article/dto/create-comment.ts +++ b/src/article/dto/create-comment.ts @@ -1,3 +1,5 @@ +import { IsNotEmpty } from 'class-validator'; export class CreateCommentDto { + @IsNotEmpty() readonly body: string; } From de901fe001bc2f59d84098ddda0a33d458b19c77 Mon Sep 17 00:00:00 2001 From: Rubin shrestha <72143629+byteglory@users.noreply.github.com> Date: Fri, 2 Oct 2020 00:57:19 +0545 Subject: [PATCH 2/2] Update create-article.dto.ts --- src/article/dto/create-article.dto.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/article/dto/create-article.dto.ts b/src/article/dto/create-article.dto.ts index a52d01d3..ad6a4459 100644 --- a/src/article/dto/create-article.dto.ts +++ b/src/article/dto/create-article.dto.ts @@ -1,6 +1,11 @@ +import { IsNotEmpty } from 'class-validator'; export class CreateArticleDto { + @IsNotEmpty() readonly title: string; + @IsNotEmpty() readonly description: string; + @IsNotEmpty() readonly body: string; + @IsNotEmpty() readonly tagList: string[]; }