Skip to content

Commit

Permalink
[ADD] Member Duplicate
Browse files Browse the repository at this point in the history
  • Loading branch information
jinjoo-lab committed Oct 6, 2023
1 parent 001fd5c commit 9eb25c6
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,8 @@ public DuplicateNicknameDto duplicateNickname(String nickName){
}

public Member getMemberById(UUID id){
Optional<Member> member = memberRepository.findById(id);
Member member = memberRepository.findById(id).orElseThrow(EntityNotFoundException::new);

if(member.isPresent()){
Member curMember = member.get();

return curMember;
}

throw new EntityNotFoundException();
return member;
}
}

0 comments on commit 9eb25c6

Please sign in to comment.