Skip to content

Commit

Permalink
update: PR review 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
encoreJeong committed Jul 10, 2024
1 parent 3acdc86 commit a649f5c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/main/java/com/goat/server/mypage/application/UserService.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import com.goat.server.mypage.exception.UserNotFoundException;
import com.goat.server.mypage.exception.errorcode.MypageErrorCode;
import com.goat.server.mypage.repository.UserRepository;
import com.goat.server.notification.domain.NotificationSetting;
import com.goat.server.notification.repository.NotificationSettingRepository;
import com.goat.server.review.domain.Review;
import com.goat.server.review.dto.request.ReviewUpdateRequest;
import com.goat.server.review.exception.ReviewNotFoundException;
Expand All @@ -29,6 +31,7 @@ public class UserService {
private final DirectoryRepository directoryRepository;
private final UserRepository userRepository;
private final S3Uploader s3Uploader;
private final NotificationSettingRepository notificationSettingRepository;

/**
* 유저 회원가입
Expand All @@ -53,6 +56,15 @@ public User createUser(final KakaoUserResponse userResponse) {
.depth(1L)
.build();

NotificationSetting notificationSetting = NotificationSetting.builder()
.user(user)
.isCommentNoti(false)
.isPostNoti(false)
.isReviewNoti(false)
.build();


notificationSettingRepository.save(notificationSetting);
directoryRepository.save(trashDirectory);
directoryRepository.save(storageDirectory);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
@Slf4j
@Service
@RequiredArgsConstructor
@Transactional(readOnly = true)
public class NotificationService {

private final NotificationRepository notificationRepository;
Expand All @@ -33,7 +34,6 @@ public void saveNotification(Notification notification) {
notificationRepository.save(notification);
}

@Transactional
public NotificationResponse getNotifications(Long userId) {

log.info("[NotificationService.getNotifications]");
Expand Down

0 comments on commit a649f5c

Please sign in to comment.