Skip to content

Commit

Permalink
Merge pull request #148 from Me1tingPot/feature/#147
Browse files Browse the repository at this point in the history
[Refactor] νšŒμ›κ°€μž…μ‹œ 일뢀 ν•„λ“œ null ν—ˆμš©ν•˜λ„λ‘ λ¦¬νŒ©ν† λ§
  • Loading branch information
JangYouJung authored Sep 25, 2024
2 parents e7b96fe + 04efcdb commit 17740da
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
13 changes: 7 additions & 6 deletions src/main/java/meltingpot/server/auth/service/AuthService.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,13 @@ public AccountResponseDto signup(SignupRequestDto signupRequest) {
.build()).toList()
);

account.setLanguages(signupRequest.languages().stream().map(
(language) -> AccountLanguage.builder()
.account(account)
.language(language)
.build()).toList()
);
if(signupRequest.languages()!=null){
account.setLanguages(signupRequest.languages().stream().map(
(language) -> AccountLanguage.builder()
.account(account)
.language(language)
.build()).toList());
}

accountRepository.save(account);

Expand Down
14 changes: 8 additions & 6 deletions src/main/java/meltingpot/server/auth/service/OAuthService.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,15 @@ public OAuthSignInResponseDto oauthSignup(OAuthSignupRequestDto signupRequest) {
.build()).toList()
);

if(signupRequest.languages()!=null) {
account.setLanguages(signupRequest.languages().stream().map(
(language) -> AccountLanguage.builder()
.account(account)
.language(language)
.build()).toList()
);
}

account.setLanguages(signupRequest.languages().stream().map(
(language) -> AccountLanguage.builder()
.account(account)
.language(language)
.build()).toList()
);

accountRepository.save(account);

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/meltingpot/server/domain/entity/Account.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,11 @@ public class Account extends BaseEntity {

private String password;

@NotNull
@Enumerated(EnumType.STRING)
private Gender gender;

@NotNull
private LocalDate birth;

@NotNull
private String nationality;

private String bio; // μ‚¬μš©μž μžκΈ°μ†Œκ°œ
Expand Down

0 comments on commit 17740da

Please sign in to comment.