Skip to content

Commit

Permalink
[fix] isCourseMine jpa repository메서드 명 변경 - #144
Browse files Browse the repository at this point in the history
  • Loading branch information
sjk4618 committed Jul 17, 2024
1 parent 66bbae2 commit 578bed3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public CourseGetDetailRes getCourseDetail(final Long userId, final Long courseId

int likesCount = likeRepository.countByCourse(foundCourse);

boolean isCourseMine = courseRepository.existsByUserId(foundUser.getId());
boolean isCourseMine = courseRepository.existsCourseByUserId(foundUser.getId());

boolean isUserLiked = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@Repository
public interface CourseRepository extends JpaRepository<Course, Long> , JpaSpecificationExecutor<Course> {
boolean existsByUserId(Long userId);
boolean existsCourseByUserId(Long userId);
@Modifying
@Transactional
@Query(value = "DELETE FROM courses WHERE course_id = :courseId", nativeQuery = true)
Expand Down

0 comments on commit 578bed3

Please sign in to comment.