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);