Skip to content

Commit

Permalink
[refactor] UserService changeUser -> modifyUser 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
wnd01jun committed Aug 16, 2024
1 parent baf5326 commit 1be08a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public interface UserService {

UserDto.ResponseUserDto findUser(Long userId);

UserDto.ResponseUserDto changeUser(Long userId, String email, String name);
UserDto.ResponseUserDto modifyUser(Long userId, UserDto.ModifyUserDto dto);

List<UserDto.ResponseUserDto> findAll();
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public UserDto.ResponseUserDto findUser(Long userId) {

@Override
@Transactional
public UserDto.ResponseUserDto changeUser(Long userId, String email, String name) {
public UserDto.ResponseUserDto modifyUser(Long userId, UserDto.ModifyUserDto dto) {
User user = userRepository.findById(userId).orElseThrow(() -> new NoSuchElementException("No such user"));
user.changeUserDate(email, name);
user.changeUserDate(dto.getEmail(), dto.getName());
return UserConverter.toDto(user);
}

Expand Down

0 comments on commit 1be08a7

Please sign in to comment.