Skip to content

Commit

Permalink
[REFACTOR] 회원 정보 수정 범위를 닉네임과 장애유형으로 제한 (#211)
Browse files Browse the repository at this point in the history
* refactor: 회원정보 수정 요청 본문이 닉네임과 장애유형만 갖도록 수정

* refactor: 회원정보 수정 메서드가 닉네임과 장애유형만 수정하도록 변경
  • Loading branch information
Profile-exe authored Nov 26, 2024
1 parent 27117e7 commit 0de4641
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
6 changes: 0 additions & 6 deletions src/main/java/econo/buddybridge/member/dto/MemberReqDto.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
package econo.buddybridge.member.dto;

import econo.buddybridge.member.entity.DisabilityType;
import econo.buddybridge.member.entity.Gender;

public record MemberReqDto(
String name,
String nickname,
String profileImageUrl,
String email,
Integer age,
Gender gender,
DisabilityType disabilityType
) {

Expand Down
8 changes: 1 addition & 7 deletions src/main/java/econo/buddybridge/member/entity/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,8 @@ public void updateKakaoToken(String kakaoToken) {
this.kakaoToken = kakaoToken;
}

public void updateMemberInfo(String name, String nickname, String profileImageUrl, String email, Integer age,
DisabilityType disabilityType, Gender gender) {
this.name = name;
public void updateMemberInfo(String nickname, DisabilityType disabilityType) {
this.nickname = nickname;
this.profileImageUrl = profileImageUrl;
this.email = email;
this.age = age;
this.disabilityType = disabilityType;
this.gender = gender;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ private Member newMember(UserInfoWithKakaoToken userInfo) {
public void updateMemberById(Long memberId, MemberReqDto memberReqDto) {
Member member = findMemberByIdOrThrow(memberId);

member.updateMemberInfo(memberReqDto.name(), memberReqDto.nickname(), memberReqDto.profileImageUrl(),
memberReqDto.email(), memberReqDto.age(), memberReqDto.disabilityType(), member.getGender());
member.updateMemberInfo(memberReqDto.nickname(), memberReqDto.disabilityType());
}

@Transactional
Expand Down

0 comments on commit 0de4641

Please sign in to comment.