Skip to content

Commit

Permalink
feat: add method to retrieve name based on loginID
Browse files Browse the repository at this point in the history
  • Loading branch information
becooq81 committed Aug 5, 2024
1 parent 211af3f commit 5b58ff4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/org/poolc/api/member/service/MemberService.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,12 @@ public List<Member> getAllMembersAndUpdateMemberIsExcepted() {
return members;
}

public String findNameByLoginID(String loginID) {
Member member = memberRepository.findByLoginID(loginID)
.orElseThrow(() -> new NoSuchElementException("No member with given login ID."));
return member.getLoginID();
}

private String resetMemberPasswordToken(String email) {
Member resetMember = memberRepository.findByEmail(email)
.orElseThrow(() -> new NoSuchElementException("No user found with given email"));
Expand Down

0 comments on commit 5b58ff4

Please sign in to comment.