From e3a533f91744179e4dd819274eee433c958ef2d7 Mon Sep 17 00:00:00 2001 From: bongsh0112 Date: Sun, 17 Dec 2023 14:30:24 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20=EB=8B=A4=EB=A5=B8=20=EB=82=A0?= =?UTF-8?q?=EC=A7=9C=EC=9D=98=20=EB=8D=B0=EC=9D=BC=EB=A6=AC=20=EC=A7=88?= =?UTF-8?q?=EB=AC=B8=EC=97=90=EB=8F=84=20=EB=8B=B5=EB=B3=80=EC=9D=84=20?= =?UTF-8?q?=EB=82=A8=EA=B8=B8=20=EC=88=98=20=EC=9E=88=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domains/question/validator/QuestionValidator.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Domain/src/main/java/tify/server/domain/domains/question/validator/QuestionValidator.java b/Domain/src/main/java/tify/server/domain/domains/question/validator/QuestionValidator.java index 806b904a..c1bc46e3 100644 --- a/Domain/src/main/java/tify/server/domain/domains/question/validator/QuestionValidator.java +++ b/Domain/src/main/java/tify/server/domain/domains/question/validator/QuestionValidator.java @@ -1,13 +1,11 @@ package tify.server.domain.domains.question.validator; -import java.time.LocalDate; import lombok.RequiredArgsConstructor; import tify.server.core.annotation.Validator; import tify.server.domain.domains.question.adaptor.AnswerAdaptor; import tify.server.domain.domains.question.adaptor.DailyQuestionAdaptor; import tify.server.domain.domains.question.exception.AlreadyAnsweredQuestionException; -import tify.server.domain.domains.question.exception.NotValidTodayQuestionException; @Validator @RequiredArgsConstructor @@ -17,11 +15,6 @@ public class QuestionValidator { private final AnswerAdaptor answerAdaptor; public void isValidateAnswerToQuestion(Long questionId, Long userId) { - // 질문이 오늘 날짜의 질문이 맞는지 - LocalDate now = LocalDate.now(); - if (!dailyQuestionAdaptor.query(questionId).getLoadingDate().isEqual(now)) { - throw NotValidTodayQuestionException.EXCEPTION; - } // 유저가 이미 해당 질문에 대한 답을 남겼는지 if (answerAdaptor.optionalQueryByQuestionAndUser(questionId, userId).isPresent()) { throw AlreadyAnsweredQuestionException.EXCEPTION;