Skip to content

Commit f7173ab

Browse files
authored
feat: 코스 상세 조회 로직 수정
- 코스 상세 조회시 코스를 생성한 유저일 경우 비활성화된 코스라도 상세조회 가능하도록 로직 변경
2 parents 48e6c13 + 4d7a16e commit f7173ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/day_walk/backend/domain/course/service/CourseService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public GetCourseDto getCourse(UUID courseId, UUID userId) {
112112
throw new CustomException(ErrorCode.COURSE_NOT_FOUND);
113113
} else if (courseEntity.isHasDelete()) {
114114
throw new CustomException(ErrorCode.COURSE_DELETE_TRUE);
115-
} else if (!courseEntity.isVisible()) {
115+
} else if (!courseEntity.isVisible() && courseEntity.getUserId() != userId) {
116116
throw new CustomException(ErrorCode.COURSE_VISIBLE_FALSE);
117117
}
118118

0 commit comments

Comments
 (0)