diff --git a/src/main/java/zipdabang/server/service/MemberService.java b/src/main/java/zipdabang/server/service/MemberService.java index 79e16f3..a94ce07 100644 --- a/src/main/java/zipdabang/server/service/MemberService.java +++ b/src/main/java/zipdabang/server/service/MemberService.java @@ -65,4 +65,6 @@ public interface MemberService { Page findFollowing(Member member, Integer page); Page findFollower(Member member, Integer page); + + Boolean checkFollowing(Member loginMember, Member targetMember); } diff --git a/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java b/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java index d7d3f51..33c73de 100644 --- a/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java +++ b/src/main/java/zipdabang/server/service/serviceImpl/MemberServiceImpl.java @@ -410,6 +410,11 @@ public Page findFollower(Member member, Integer page) { return followerMember; } + + @Override + public Boolean checkFollowing(Member loginMember, Member targetMember) { + return followRepository.findByFollowerAndFollowee(loginMember,targetMember).isPresent(); + } }