From f610f229fd99b87c4711d4f4c60fb2a83e5eeb49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=8A=B9=EC=A7=84?= Date: Sat, 13 Jan 2024 23:03:27 +0900 Subject: [PATCH] =?UTF-8?q?[HOTFIX]=20=EB=A9=A4=EB=B2=84=20=EC=A1=B0?= =?UTF-8?q?=ED=9A=8C=EC=8B=9C=20=EB=B3=B8=EC=9D=B8=20=EC=A0=9C=EC=99=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../twtw/backend/domain/member/service/MemberService.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/com/twtw/backend/domain/member/service/MemberService.java b/backend/src/main/java/com/twtw/backend/domain/member/service/MemberService.java index 730473ca..fb6c5fad 100644 --- a/backend/src/main/java/com/twtw/backend/domain/member/service/MemberService.java +++ b/backend/src/main/java/com/twtw/backend/domain/member/service/MemberService.java @@ -17,11 +17,12 @@ @Service public class MemberService { private final MemberRepository memberRepository; - + private final AuthService authService; private final MemberMapper memberMapper; - public MemberService(MemberRepository memberRepository, MemberMapper memberMapper) { + public MemberService(MemberRepository memberRepository, AuthService authService, MemberMapper memberMapper) { this.memberRepository = memberRepository; + this.authService = authService; this.memberMapper = memberMapper; } @@ -36,9 +37,10 @@ public Member getMemberById(UUID id) { } @Transactional(readOnly = true) - public List getMemberByNickname(String nickname) { + public List getMemberByNickname(final String nickname) { final List members = memberRepository.findAllByNicknameContainingIgnoreCase(nickname); + members.removeIf(authService.getMemberByJwt()::equals); return getResponsesByMembers(members); }