Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ public ResponseEntity<SignupResponseDTO> signup(@Valid @RequestBody SignupReques
userBadgeService.initializeUserBadges(savedUser);

SignupResponseDTO response = SignupResponseDTO.builder()
.role(savedUser.getRole())
.userId(savedUser.getId())
.email(savedUser.getEmail())
.nameId(savedUser.getNameId())
.nickname(savedUser.getNickname())
.marketingAgreed(savedUser.getMarketingAgreed())
.notificationAgreed(savedUser.getNotificationAgreed())
.message("회원가입이 완료되었습니다.")
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,4 @@ public static UserResponseDTO.UserBlockResponseDto toUserBlockResponseDto(UserBl
.targetUserId(userBlock.getBlockedUser().getId())
.build();
}

// public static User toUser(SignupRequestDTO request) {
// return User.builder()
// .email(request.getEmail())
// .password(request.getPassword())
// .role(request.getRole())
// .build();
// }
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ public class SignupRequestDTO {
@NotBlank(message = "다시 한 번 입력해 주세요.")
private String passwordConfirm;

@AssertTrue(message = "비밀번호가 일치하지 않습니다.")
public boolean isPasswordMatching() {
return password != null && password.equals(passwordConfirm); // password : Not Null
}

@NotBlank
@Size(min = 5, max = 8)
@Pattern(regexp = "^[a-z0-9]+$", message = "5~8자 사이의 소문자 및 숫자 입력")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public class UserService {
private final UserRepository userRepository;
private final UserBlockRepository userBlockRepository;
private final UserFollowRepository userFollowRepository;

private final PasswordEncoder passwordEncoder;

public User signup(SignupRequestDTO request) {
Expand All @@ -49,6 +48,7 @@ public User signup(SignupRequestDTO request) {

// 저장
User user = User.builder()
.role(request.getRole())
.email(request.getEmail())
.password(passwordEncoder.encode(request.getPassword()))
.nameId(request.getNameId())
Expand Down
Loading