Skip to content

Commit 17e7bb3

Browse files
committed
change question dto
1 parent 78a9df6 commit 17e7bb3

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

backend/question-service/src/dto/CreateQuestion.dto.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,21 @@ export class CreateQuestionDto {
3333
@IsNotEmpty()
3434
@IsString()
3535
description: string;
36-
'';
36+
3737
@IsNotEmpty()
3838
@IsEnum(Category, {
3939
message:
4040
'Category must be Algorithm, DynamicProgramming, Array, SQL, Heap, Recursion, Graph, Sorting',
4141
})
42-
category: Category;
42+
categories: Category;
4343

4444
@IsNotEmpty()
4545
@IsEnum(Difficulty, {
4646
message: 'Difficulty must be easy, medium, hard',
4747
})
48-
difficulty: Difficulty;
48+
complexity: Difficulty;
49+
50+
@IsNotEmpty()
51+
@IsString()
52+
link: string;
4953
}

backend/question-service/src/dto/UpdateQuestion.dto.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,16 @@ import {
3939
message:
4040
'Category must be Algorithm, DynamicProgramming, Array, SQL, Heap, Recursion, Graph, Sorting',
4141
})
42-
category: Category;
42+
categories: Category;
4343

4444
@IsNotEmpty()
4545
@IsEnum(Difficulty, {
4646
message: 'Difficulty must be easy, medium, hard',
4747
})
48-
difficulty: Difficulty;
48+
complexity: Difficulty;
49+
50+
@IsNotEmpty()
51+
@IsString()
52+
link: string;
4953
}
5054

0 commit comments

Comments
 (0)