Conversation
Chuseok22
requested changes
Oct 28, 2024
Member
Chuseok22
left a comment
There was a problem hiding this comment.
제약조건에 있는 username, nickname 중복 처리 부분만 추가해주면 될 것 같아
고생했어~~
Comment on lines
17
to
24
Member
There was a problem hiding this comment.
@column(nullable = false, unique = true)
이렇게 설정하면 null 값 들어오는거 막을 수 있고, 중복된 값 들어오는거 막을 수 있어
Comment on lines
+29
to
+35
| User user = userRepository.findByUsername(userDto.getUsername()); | ||
| if (user != null) { | ||
| if (user.getPassword().equals(userDto.getPassword())) { | ||
| return user.getNickname() + "님, 환영합니다!!"; | ||
| } | ||
| } | ||
| return "아이디 및 비밀번호가 일치하지 않습니다."; |
Member
There was a problem hiding this comment.
user가 null인 경우를 대비해서 if 조건문으로 로직 작성했는데
Optional로 받아서 처리하는 것도 괜찮습니다~
Chuseok22
reviewed
Oct 29, 2024
Comment on lines
+14
to
16
|
|
||
| // 회원 가입 | ||
| public UserDto join(UserDto userDto) { |
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.
No description provided.