diff --git a/src/main/java/com/example/parking/application/member/MemberService.java b/src/main/java/com/example/parking/application/member/MemberService.java index 94200455..129a9485 100644 --- a/src/main/java/com/example/parking/application/member/MemberService.java +++ b/src/main/java/com/example/parking/application/member/MemberService.java @@ -62,12 +62,14 @@ private void validatePassword(Member member, String password) { public void deleteMember(Long memberId) { Member member = memberRepository.getById(memberId); member.delete(); + } @Transactional(readOnly = true) public MemberInfoResponse findMemberInfo(Long memberId) { Member member = memberRepository.getById(memberId); return new MemberInfoResponse(member.getName(), member.getEmail()); + } @Transactional public void changePassword(Long memberId, PasswordChangeRequest dto) { diff --git a/src/main/java/com/example/parking/domain/member/Member.java b/src/main/java/com/example/parking/domain/member/Member.java index b1003ffb..5605e2c7 100644 --- a/src/main/java/com/example/parking/domain/member/Member.java +++ b/src/main/java/com/example/parking/domain/member/Member.java @@ -46,6 +46,7 @@ public boolean checkPassword(String password) { public void delete() { deleted = Boolean.TRUE; + } public void changePassword(String previousPassword, String newPassword) { if (checkPassword(previousPassword)) {