Skip to content

Commit

Permalink
Merge pull request #123 from Team-Shaka/fix/122
Browse files Browse the repository at this point in the history
🐛 Fix: 알림 생성이 필요한 로직들에서 userId를 지정하도록 수정
  • Loading branch information
HyoBN authored Sep 9, 2024
2 parents d39929b + 48ff8fa commit 13efd46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public CommentResponseDTO.CommentIdResponseDto createComment(User user, Long tre

//알림 생성
NotificationRequestDTO.createNotification notificationRequest = new NotificationRequestDTO.createNotification();
notificationRequest.setReceiverId(post.getWriter().getId()); // 여기서 receiver 설정 (예시)
notificationRequest.setReceiverId(post.getWriter().getUser().getId()); // 여기서 receiver 설정 (예시)
notificationRequest.setTargetId(post.getId());
notificationRequest.setType(NotificationType.COMMENT); // 알림 타입 설정 (예시)
notificationService.createNotification(user, treehouseId, notificationRequest, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public String reactToPost(User user, Long treehouseId, Long postId, PostRequestD

//알림 생성
NotificationRequestDTO.createNotification notificationRequest = new NotificationRequestDTO.createNotification();
notificationRequest.setReceiverId(post.getWriter().getId()); // 여기서 receiver 설정 (예시)
notificationRequest.setReceiverId(post.getWriter().getUser().getId()); // 여기서 receiver 설정 (예시)
notificationRequest.setTargetId(post.getId());
notificationRequest.setType(NotificationType.POST_REACTION); // 알림 타입 설정 (예시)
notificationService.createNotification(user, treehouseId, notificationRequest, savedReaction.getReactionName());
Expand Down

0 comments on commit 13efd46

Please sign in to comment.