Skip to content

Commit

Permalink
[fix] 유저 온보딩 초기화 메서드
Browse files Browse the repository at this point in the history
  • Loading branch information
MinchoGreenT committed Jun 27, 2024
1 parent a5a1efa commit 16bb736
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,10 @@ public BaseResponseDto<Void> settingProfile(
return userService.settingProfile(user.getUserId(), file, nickname);
}

@PostMapping("/init/{userId}")
public void initUser(
@PathVariable Long userId
) {
userService.initUser(userId);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,5 +121,7 @@ public void addMissionPostLike(MissionPostLike missionPostLike) {
missionPostLikes.add(missionPostLike);
}


public void initUser() {
this.early = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,12 @@ public void checkUserData(User user){
}
}

@Transactional
public void initUser(Long userId) {
User user = userRepository.findUserById(userId);
user.initUser();
}

private void updateUserProfileAccordingToProfileImage(MultipartFile multipartFile, String nickName, Long userId) throws IOException {
if(multipartFile.isEmpty()){

Expand Down

0 comments on commit 16bb736

Please sign in to comment.