Skip to content

Commit fc18102

Browse files
committed
refactor(user): userAuthInfo 네이밍 변경
- RequestDto로 두는 것보다 VO의 개념으로 두는 것이 더 올바르다고 판단.
1 parent cdf7441 commit fc18102

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/main/java/com/somemore/user/service/RegisterUserService.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import com.somemore.user.domain.User;
66
import com.somemore.user.domain.UserCommonAttribute;
77
import com.somemore.user.domain.UserSetting;
8-
import com.somemore.user.dto.UserAuthInfoRequestDto;
8+
import com.somemore.user.dto.UserAuthInfo;
99
import com.somemore.user.repository.user.UserRepository;
1010
import com.somemore.user.repository.usercommonattribute.UserCommonAttributeRepository;
1111
import com.somemore.user.repository.usersetting.UserSettingRepository;
@@ -29,17 +29,17 @@ public class RegisterUserService implements RegisterUserUseCase {
2929

3030
@Override
3131
public User registerOAuthUser(CommonOAuthInfo commonOAuthInfo, UserRole role) {
32-
UserAuthInfoRequestDto userAuthInfoRequestDto = UserAuthInfoRequestDto.createForOAuth(commonOAuthInfo.provider());
33-
return createAndRegisterUser(role, userAuthInfoRequestDto);
32+
UserAuthInfo userAuthInfo = UserAuthInfo.createForOAuth(commonOAuthInfo.provider());
33+
return createAndRegisterUser(role, userAuthInfo);
3434
}
3535

3636
@Override
37-
public User registerLocalUser(UserAuthInfoRequestDto userAuthInfoRequestDto, UserRole role) {
38-
return createAndRegisterUser(role, userAuthInfoRequestDto);
37+
public User registerLocalUser(UserAuthInfo userAuthInfo, UserRole role) {
38+
return createAndRegisterUser(role, userAuthInfo);
3939
}
4040

41-
private User createAndRegisterUser(UserRole role, UserAuthInfoRequestDto userAuthInfoRequestDto) {
42-
User user = User.from(userAuthInfoRequestDto, role);
41+
private User createAndRegisterUser(UserRole role, UserAuthInfo userAuthInfo) {
42+
User user = User.from(userAuthInfo, role);
4343
userRepository.save(user);
4444
UUID userId = user.getId();
4545

src/main/java/com/somemore/user/usecase/RegisterUserUseCase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import com.somemore.user.domain.UserRole;
44
import com.somemore.global.auth.oauth.domain.CommonOAuthInfo;
55
import com.somemore.user.domain.User;
6-
import com.somemore.user.dto.UserAuthInfoRequestDto;
6+
import com.somemore.user.dto.UserAuthInfo;
77

88
public interface RegisterUserUseCase {
99
User registerOAuthUser(CommonOAuthInfo commonOAuthInfo, UserRole role);
10-
User registerLocalUser(UserAuthInfoRequestDto userAuthInfoRequestDto, UserRole role);
10+
User registerLocalUser(UserAuthInfo userAuthInfo, UserRole role);
1111
}

0 commit comments

Comments
 (0)