diff --git a/src/main/java/com/hackathon/momento/member/api/MemberController.java b/src/main/java/com/hackathon/momento/member/api/MemberController.java index 2975bd1..ce0b2ba 100644 --- a/src/main/java/com/hackathon/momento/member/api/MemberController.java +++ b/src/main/java/com/hackathon/momento/member/api/MemberController.java @@ -82,16 +82,16 @@ public RspTemplate updateProfile( @PostMapping("/check-duplicate") @Operation( - summary = "이메일 중복 검사", - description = "해당 사용자가 존재하는지 여부를 검사합니다.", + summary = "최초 로그인 여부 체크", + description = "해당 사용자가 최초 로그인인지 체크합니다.", responses = { - @ApiResponse(responseCode = "200", description = "중복 검사 성공"), + @ApiResponse(responseCode = "200", description = "최초 로그인 여부 체크 성공"), @ApiResponse(responseCode = "400", description = "잘못된 요청"), @ApiResponse(responseCode = "500", description = "서버 오류") } ) public RspTemplate checkDuplicateRequest(Principal principal) { boolean isDuplicate = memberService.checkDuplicate(principal); - return new RspTemplate<>(HttpStatus.OK, String.valueOf(isDuplicate)); + return new RspTemplate<>(HttpStatus.OK, "최초 로그인 여부 체크 성공", String.valueOf(isDuplicate)); } } diff --git a/src/main/java/com/hackathon/momento/member/application/MemberService.java b/src/main/java/com/hackathon/momento/member/application/MemberService.java index d400bbc..65ff2e7 100644 --- a/src/main/java/com/hackathon/momento/member/application/MemberService.java +++ b/src/main/java/com/hackathon/momento/member/application/MemberService.java @@ -48,7 +48,7 @@ public ProfileResDto updateProfile(Principal principal, UpdateProfileReqDto reqD public boolean checkDuplicate(Principal principal) { Member member = getMemberByPrincipal(principal); - return memberRepository.existsById(member.getId()); + return member.getStack() == null || member.getPersona() == null || member.getAbility() == null; } private Member getMemberByPrincipal(Principal principal) { diff --git a/src/main/java/com/hackathon/momento/member/domain/repository/MemberRepository.java b/src/main/java/com/hackathon/momento/member/domain/repository/MemberRepository.java index b9fd5fc..4412139 100644 --- a/src/main/java/com/hackathon/momento/member/domain/repository/MemberRepository.java +++ b/src/main/java/com/hackathon/momento/member/domain/repository/MemberRepository.java @@ -8,6 +8,5 @@ @Repository public interface MemberRepository extends JpaRepository { - Optional findByEmail(String email); }