diff --git a/packages/backend/src/quizzes/dto/quiz.dto.ts b/packages/backend/src/quizzes/dto/quiz.dto.ts index 85a74f0..353d89f 100644 --- a/packages/backend/src/quizzes/dto/quiz.dto.ts +++ b/packages/backend/src/quizzes/dto/quiz.dto.ts @@ -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[]; } diff --git a/packages/backend/src/quizzes/quizzes.service.ts b/packages/backend/src/quizzes/quizzes.service.ts index 7af5bee..0b2a423 100644 --- a/packages/backend/src/quizzes/quizzes.service.ts +++ b/packages/backend/src/quizzes/quizzes.service.ts @@ -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;