From 37d6b41078491cbe9cdac41cbc11f881287b759b Mon Sep 17 00:00:00 2001 From: luizy Date: Mon, 4 Dec 2023 15:43:56 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=B0=B0=EC=97=B4=EB=A1=9C=20=EC=A0=84?= =?UTF-8?q?=EB=8B=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [#9] --- packages/backend/src/quizzes/dto/quiz.dto.ts | 4 ++-- packages/backend/src/quizzes/quizzes.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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;