From 65c3742fd32d8e9b6fc947cc0ada0cbb42990f71 Mon Sep 17 00:00:00 2001 From: khee2 <21keunghee@gmail.com> Date: Mon, 5 Aug 2024 15:43:28 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85?= =?UTF-8?q?=EC=8B=9C=20=EC=A4=91=EB=B3=B5=20=EC=95=84=EC=9D=B4=EB=94=94=20?= =?UTF-8?q?=EB=B6=88=EA=B0=80=ED=95=98=EA=B2=8C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - findByNickname 대신 findByLoginId 로 올바르게 로그인id를 찾음 --- .../domain/member/repository/MemberRepository.java | 2 ++ .../midpoint_backend/domain/member/service/MemberService.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/solucitation/midpoint_backend/domain/member/repository/MemberRepository.java b/src/main/java/com/solucitation/midpoint_backend/domain/member/repository/MemberRepository.java index d26b0f7..d25e5ca 100644 --- a/src/main/java/com/solucitation/midpoint_backend/domain/member/repository/MemberRepository.java +++ b/src/main/java/com/solucitation/midpoint_backend/domain/member/repository/MemberRepository.java @@ -10,6 +10,8 @@ public interface MemberRepository extends JpaRepository { Optional findByEmail(String email); Optional findByNickname(String nickname); + + Optional findByLoginId(String loginId); Optional findByEmailOrLoginId(String email, String nickname); Optional findByName(String name); } diff --git a/src/main/java/com/solucitation/midpoint_backend/domain/member/service/MemberService.java b/src/main/java/com/solucitation/midpoint_backend/domain/member/service/MemberService.java index 88ba3c9..251f0bd 100644 --- a/src/main/java/com/solucitation/midpoint_backend/domain/member/service/MemberService.java +++ b/src/main/java/com/solucitation/midpoint_backend/domain/member/service/MemberService.java @@ -98,7 +98,7 @@ public boolean isNicknameAlreadyInUse(String nickname) { * @return 로그인 아이디가 이미 사용 중이면 true, 아니면 false */ public boolean isLoginIdAlreadyInUse(String loginId) { - return memberRepository.findByNickname(loginId).isPresent(); + return memberRepository.findByLoginId(loginId).isPresent(); } /**