Skip to content

Commit

Permalink
Fix: 카카오 회원가입 파라미터
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeongho427 committed Jun 5, 2024
1 parent 42b2294 commit 2d99368
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ public class CreateUserRequest {

private String imageUrl;

/*private String gender;
private String gender;

private String birthyear;*/
private String birthyear;

private String location;
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ public ReadMainRes readMainPage() {

@Transactional
public User createUser(CreateUserRequest request) {
/* int currentYear = LocalDate.now().getYear();
int currentYear = LocalDate.now().getYear();
int birthYear = Integer.parseInt(request.getBirthyear());
long age = currentYear - birthYear + 1;*/
long age = currentYear - birthYear + 1;
return User.builder()
.name(request.getName())
.email(request.getEmail())
.imageUrl(request.getImageUrl())
//.gender(Objects.equals(request.getGender(), "male") ? Gender.MALE : Gender.FEMALE)
//.age(age)
.gender(Objects.equals(request.getGender(), "male") ? Gender.MALE : Gender.FEMALE)
.age(age)
.location(request.getLocation())
.point(0L)
.build();
Expand Down

0 comments on commit 2d99368

Please sign in to comment.