From c494bfb654532479e67ad069849691e613a568fd Mon Sep 17 00:00:00 2001 From: yeseul106 <20191037@sungshin.ac.kr> Date: Tue, 18 Jul 2023 23:28:24 +0900 Subject: [PATCH] =?UTF-8?q?[FIX]=20=EA=B0=9C=EC=9D=B8=20=EB=8C=80=EC=8B=9C?= =?UTF-8?q?=EB=B3=B4=EB=93=9C=20=EC=A1=B0=ED=9A=8C=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=97=86=EB=8A=94=20=EC=9C=A0=EC=A0=80=EB=A1=9C=20=EC=9A=94?= =?UTF-8?q?=EC=B2=AD=ED=95=A0=20=EC=8B=9C,=20=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/project/service/Impl/ProjectServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/puzzlingServer/src/main/java/com/puzzling/puzzlingServer/api/project/service/Impl/ProjectServiceImpl.java b/puzzlingServer/src/main/java/com/puzzling/puzzlingServer/api/project/service/Impl/ProjectServiceImpl.java index 038dcdf..53785ed 100644 --- a/puzzlingServer/src/main/java/com/puzzling/puzzlingServer/api/project/service/Impl/ProjectServiceImpl.java +++ b/puzzlingServer/src/main/java/com/puzzling/puzzlingServer/api/project/service/Impl/ProjectServiceImpl.java @@ -71,14 +71,14 @@ public ProjectOwnPuzzleResponseDto getMyPuzzles(Long memberId, Long projectId, S throw new BadRequestException(ErrorStatus.VALIDATION_REQUEST_MISSING_EXCEPTION.getMessage()); } + if (findMemberById(memberId) == null) { + throw new BadRequestException(ErrorStatus.NOT_FOUND_MEMBER.getMessage()); + } + Pageable pageable = PageRequest.of(0, 15); // 첫 번째 페이지, 페이지 크기 15 Page pageReviews = reviewRepository.findTop15ByMemberIdAndProjectId(memberId, projectId, pageable); List top15Reviews = pageReviews.getContent(); - if (top15Reviews.isEmpty()) { - throw new NotFoundException(ErrorStatus.NOT_FOUND_USER_PROJECT.getMessage()); - } - Boolean isReviewDay = checkTodayIsReviewDay(today, findProjectById(projectId).getReviewCycle()); Boolean hasTodayReview = reviewRepository.existsReviewByReviewDate(today);