Skip to content

Commit 77c1911

Browse files
authored
Merge pull request #168 from slid-todo/fix/mypage-query
fix: 팔로워, 팔로이 수 세는 쿼리 수정
2 parents 01fbbbc + 9915052 commit 77c1911

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/codeit/todo/repository/FollowRepository.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ public interface FollowRepository extends JpaRepository<Follow, Integer> {
2020
boolean existsByFollower_FollowerIdAndFollowee_FolloweeId(@Param("userId")int userId, @Param("targetUserId")int targetUserId);
2121

2222
@Query("SELECT COUNT(*) FROM Follow f " +
23-
"WHERE f.followee.userId = :userId ")
23+
"WHERE f.follower.userId = :userId ")
2424
int countByFollower(@Param("userId") int userId);
2525

2626
@Query("SELECT COUNT(*) FROM Follow f " +
27-
"WHERE f.follower.userId = :userId ")
27+
"WHERE f.followee.userId = :userId ")
2828
int countByFollowee(@Param("userId") int userId);
2929

3030

0 commit comments

Comments
 (0)