Skip to content

Commit

Permalink
feat: 배열로 전달
Browse files Browse the repository at this point in the history
[#9]
  • Loading branch information
LuizyHub authored and flydog98 committed Dec 4, 2023
1 parent f3fa095 commit 37d6b41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/backend/src/quizzes/dto/quiz.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class QuizDto {
@IsString()
@ApiProperty({
description: '모범 답안',
example: '`git` status\n`git` add README.md docs/plan.md',
example: ['`git` status', '`git` add README.md docs/plan.md'],
})
readonly answer: string;
readonly answer: string[];
}
2 changes: 1 addition & 1 deletion packages/backend/src/quizzes/quizzes.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class QuizzesService {
description: quiz.description,
keywords: quiz.keywords.map((keyword) => keyword.keyword),
category: quiz.category.name,
answer: quiz.answer,
answer: quiz.answer.split('\\n'),
};

return quizDto;
Expand Down

0 comments on commit 37d6b41

Please sign in to comment.