From 1be08a7b2c3dce75746819cfe166287fe0374f3b Mon Sep 17 00:00:00 2001 From: wnd01jun Date: Fri, 16 Aug 2024 15:16:43 +0900 Subject: [PATCH] =?UTF-8?q?[refactor]=20UserService=20changeUser=20->=20mo?= =?UTF-8?q?difyUser=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bbteam/budgetbuddies/domain/user/service/UserService.java | 2 +- .../budgetbuddies/domain/user/service/UserServiceImpl.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/bbteam/budgetbuddies/domain/user/service/UserService.java b/src/main/java/com/bbteam/budgetbuddies/domain/user/service/UserService.java index 2e803747..0cb29dba 100644 --- a/src/main/java/com/bbteam/budgetbuddies/domain/user/service/UserService.java +++ b/src/main/java/com/bbteam/budgetbuddies/domain/user/service/UserService.java @@ -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 findAll(); } diff --git a/src/main/java/com/bbteam/budgetbuddies/domain/user/service/UserServiceImpl.java b/src/main/java/com/bbteam/budgetbuddies/domain/user/service/UserServiceImpl.java index adc2d550..2ce9dbb1 100644 --- a/src/main/java/com/bbteam/budgetbuddies/domain/user/service/UserServiceImpl.java +++ b/src/main/java/com/bbteam/budgetbuddies/domain/user/service/UserServiceImpl.java @@ -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); }