Skip to content

Conversation

@HyerimH
Copy link

@HyerimH HyerimH commented Oct 28, 2024

No description provided.

Copy link
Member

@Chuseok22 Chuseok22 left a comment

Choose a reason for hiding this comment

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

로그인 로직도 작성해주세용~~

그리구 application.yml 파일 ignore 시키는건 괜찮은데

.gitignore 파일 자체를 삭제하지 말아주세용~~

그나마 우리가 같은 버전을 사용하기에 충돌이 일어나지 않는데 .gradle, .idea 등등 이런 파일들은 자동으로 gitignore에 등록되어있어용 해당 파일들은 공유하지 않는게 좋아서 .gitignore 파일 자체를 삭제하면 안됩니당~~

userRepository.save(user);
return userDto;
}

Copy link
Member

Choose a reason for hiding this comment

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

로그인 로직도 만들어주세용~~

Copy link
Author

Choose a reason for hiding this comment

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

하하 만드는 중

Comment on lines +19 to +35
if (userDto.getUsername() == null || userDto.getUsername().isEmpty()) {
throw new RuntimeException("아이디를 입력해 주세요.");
}
if (userDto.getPassword() == null || userDto.getPassword().isEmpty()) {
throw new RuntimeException("비밀번호를 입력해 주세요.");
}
if (userDto.getNickname() == null || userDto.getNickname().isEmpty()) {
throw new RuntimeException("닉네임을 입력해 주세요.");
}

if (userRepository.existsByUsername(userDto.getUsername())) {
throw new RuntimeException("아이디가 이미 존재합니다.");
}
if (userRepository.existsByNickname(userDto.getNickname())) {
throw new RuntimeException("닉네임이 이미 존재합니다.");
}

Copy link
Member

Choose a reason for hiding this comment

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

예외 처리 엄청 잘했어!!!
그런데 만약에 19~34번째 줄이 없을 경우 한번 테스트 해볼까???

  • 아이디, 비밀번호, 닉네임이 null인경우 저장되는지
  • 아이디와 닉네임이 중복 저정이 가능한지 한번 테스트해봅시당

Copy link
Author

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.

3 participants