Skip to content

Commit a2eb5e5

Browse files
committed
feat: QA용 createQuizSolveContext로직 수정
1 parent 2bb6431 commit a2eb5e5

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/main/kotlin/org/gitanimals/quiz/app/CreateQuizFacade.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ class CreateQuizFacade(
146146
companion object {
147147
const val CREATE_QUIZ_PRICE = 5_000L
148148
private const val CREATE_QUIZ_SIMILARITY_CHECK_MESSAGE =
149-
"Your quiz has been successfully created, but a similar quiz has been found and is under review. The awarded points may be revoked."
150-
private const val CREATE_QUIZ_SUCCESS_MESSAGE = "Success to create quiz."
149+
"Your quiz has been successfully created, but a similar quiz has been found and is under review. The awarded $CREATE_QUIZ_PRICE points may be revoked."
150+
private const val CREATE_QUIZ_SUCCESS_MESSAGE = "Success to create quiz and get $CREATE_QUIZ_PRICE points"
151151
}
152152
}

src/main/kotlin/org/gitanimals/quiz/domain/context/QuizSolveContextService.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ class QuizSolveContextService(
1313
private val quizSolveContextRepository: QuizSolveContextRepository,
1414
) {
1515

16-
@Transactional
16+
// @Transactional
1717
fun createQuizSolveContext(
1818
userId: Long,
1919
category: Category,
2020
quizs: List<Quiz>,
2121
): QuizSolveContext {
2222
val now = LocalDate.ofInstant(instant(), ZoneId.of("Asia/Seoul"))
2323
quizSolveContextRepository.findQuizSolveContextByUserIdAndSolvedAt(userId, now)?.let {
24-
throw IllegalArgumentException("Already solve daily quiz.")
24+
quizSolveContextRepository.deleteAll() // 전체삭제 QA끝나고 지운다.
25+
// throw IllegalArgumentException("Already solve daily quiz.")
2526
}
2627

2728
val quizSolveContext = QuizSolveContext.of(

0 commit comments

Comments
 (0)