Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

권세빈 2주차 과제 #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

sebeeeen
Copy link

@sebeeeen sebeeeen commented Oct 9, 2024

스크린샷 2024-10-09 오후 5 29 36 스크린샷 2024-10-09 오후 5 29 46

비밀번호에서 @를 뺏습니당

@sebeeeen sebeeeen changed the title week2-api-hw 권세빈 2주차 과제 Oct 9, 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);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿굿입니다!

Comment on lines +42 to 48
public void updateName(String newName) {
if (newName == null || newName.trim().isEmpty()) {
throw new IllegalArgumentException("이름은 비어있을 수 없습니다.");
}
this.memberName = newName;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow trim까지.. 좋습니다!!

Copy link
Member

@jjunhub jjunhub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

너무 깔끔하게 잘 해주셨씁니다! 수고하셨습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants