Open
Conversation
jjunhub
reviewed
Oct 26, 2024
Comment on lines
53
to
66
| // TODO : 로그인을 진행한다. | ||
| public AuthLoginResponse login(AuthLoginRequest request) { | ||
| // DB에서 memberLoginId와 memberPassword를 조회하여 일치하는 회원이 있는지 확인한다. | ||
| Member member = memberRepository.findByMemberLoginIdAndMemberPassword( | ||
| request.getMemberLoginId(), request.getMemberPassword()); | ||
|
|
||
| // 만약 일치하는 회원이 없다면, IllegalArgumentException을 발생시킨다. | ||
| if (member == null) { | ||
| throw new IllegalArgumentException("아이디 또는 비밀번호가 일치하지 않습니다."); | ||
| } | ||
|
|
||
| // 일치하는 회원이 있다면, MemberResponse로 변환하여 반환한다. | ||
| return null; | ||
| // 일치하는 회원이 있다면, AuthLoginResponse로 변환하여 반환한다. | ||
| return AuthLoginResponse.from(member); | ||
| } |
jjunhub
reviewed
Oct 26, 2024
Comment on lines
+42
to
48
| public void updateName(String newName) { | ||
| if (newName == null || newName.trim().isEmpty()) { | ||
| throw new IllegalArgumentException("이름은 비어있을 수 없습니다."); | ||
| } | ||
| this.memberName = newName; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
비밀번호에서 @를 뺏습니당