Skip to content

Commit f7540ee

Browse files
committed
Revert "fix: getProfile NPE 수정 및 updatePersonalInfo 트랜잭션 추가"
This reverts commit b8898eb.
1 parent b8898eb commit f7540ee

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/guesthouse/user/service/UserService.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import guesthouse.certificate.repository.CertificateRepository;
55
import guesthouse.user.domain.model.User;
66
import guesthouse.user.domain.vo.Gender;
7-
import guesthouse.user.domain.vo.PersonalInfo;
87
import guesthouse.user.dto.ProfileDTO;
98
import guesthouse.user.exception.UserErrorCode;
109
import guesthouse.user.exception.UserException;
@@ -29,7 +28,6 @@ public User findById(Long id) {
2928
.orElseThrow(() -> new UserException(UserErrorCode.NOT_FOUND));
3029
}
3130

32-
@Transactional
3331
public void updatePersonalInfo(String name,
3432
String phoneNumber,
3533
LocalDate birthDate,
@@ -49,9 +47,8 @@ public ProfileDTO getProfile(Long userId) {
4947
boolean hasInReview = certificates.stream()
5048
.anyMatch(certificate -> certificate.getStatus().isInReview());
5149

52-
PersonalInfo personalInfo = user.getPersonalInfo();
5350
return new ProfileDTO(
54-
personalInfo != null ? personalInfo.getName() : null,
51+
user.getPersonalInfo().getName(),
5552
user.getProfileImageUrl(),
5653
isOwner,
5754
hasInReview

0 commit comments

Comments
 (0)