Skip to content

Commit

Permalink
Merge pull request #117 from studio-recoding/dev
Browse files Browse the repository at this point in the history
[⚠️!HOTFIX] 14차 배포
  • Loading branch information
JeonHaeseung authored Jun 20, 2024
2 parents a35c293 + e9c1c15 commit e9bd27c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/Ness/Backend/domain/member/MemberService.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ public void deleteMember(Member member) {
memberRepository.save(member);
}

public Member createMember(String email, String password, String picture, String nickname, String name, Boolean isEmailActive) {
public void createMember(String email, String password, String picture, String nickname, String name, Boolean isEmailActive) {
Member member = Member.builder()
.email(email)
.password(bCryptPasswordEncoder.encode(password)) //비밀번호는 해싱해서 DB에 저장
.build();

memberRepository.save(member);

Profile profile = Profile.builder()
.pictureUrl(picture)
.nickname(nickname)
Expand All @@ -41,6 +43,8 @@ public Member createMember(String email, String password, String picture, String
.personaType(PersonaType.NESS) //디폴트로 NESS를 저장해줌, 나중에 개인 페이지에서 변경 가능
.build();

profileRepository.save(profile);

//디폴트 미분류 카테고리가 있어야 함, 맴버 생성시 자동 만들어주기
//회색
Category noneCategory = Category.builder()
Expand Down Expand Up @@ -78,12 +82,11 @@ public Member createMember(String email, String password, String picture, String
.color("#FFB775")
.build();

profileRepository.save(profile);
categoryRepository.save(noneCategory);
categoryRepository.save(studyCategory);
categoryRepository.save(workoutCategory);
categoryRepository.save(restCategory);
categoryRepository.save(meetingCategory);
return memberRepository.save(member);
return;
}
}

0 comments on commit e9bd27c

Please sign in to comment.