Skip to content

Commit

Permalink
Merge pull request #117 from KAKAO-TOUR-API-CONTEST/devyj
Browse files Browse the repository at this point in the history
fix : 닉네임 ,폰번호 update
  • Loading branch information
yyujin1231 authored Sep 29, 2024
2 parents 51af904 + 9df9b79 commit 5371a20
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/example/ai_jeju/service/MyJejuService.java
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,10 @@ public void deleteProfileImage(Long id) {

//원래대로
public void updateUser(Long userId, ModifyMyPageRequest modifyMyPageRequest) {
// 수정할 유저 찾기

User user = userRepository.findById(userId)
.orElseThrow(() -> new UserNotFoundException("User not found with id: " + userId));

// 닉네임과 전화번호 업데이트
if (modifyMyPageRequest.getNickname().isPresent()) {
user.setNickname(modifyMyPageRequest.getNickname().get());
}
Expand Down

0 comments on commit 5371a20

Please sign in to comment.