Skip to content

Commit 13efd46

Browse files
authored
Merge pull request #123 from Team-Shaka/fix/122
🐛 Fix: 알림 생성이 필요한 로직들에서 userId를 지정하도록 수정
2 parents d39929b + 48ff8fa commit 13efd46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/treehouse/server/api/comment/business/CommentService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public CommentResponseDTO.CommentIdResponseDto createComment(User user, Long tre
169169

170170
//알림 생성
171171
NotificationRequestDTO.createNotification notificationRequest = new NotificationRequestDTO.createNotification();
172-
notificationRequest.setReceiverId(post.getWriter().getId()); // 여기서 receiver 설정 (예시)
172+
notificationRequest.setReceiverId(post.getWriter().getUser().getId()); // 여기서 receiver 설정 (예시)
173173
notificationRequest.setTargetId(post.getId());
174174
notificationRequest.setType(NotificationType.COMMENT); // 알림 타입 설정 (예시)
175175
notificationService.createNotification(user, treehouseId, notificationRequest, null);

src/main/java/treehouse/server/api/post/business/PostService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ public String reactToPost(User user, Long treehouseId, Long postId, PostRequestD
307307

308308
//알림 생성
309309
NotificationRequestDTO.createNotification notificationRequest = new NotificationRequestDTO.createNotification();
310-
notificationRequest.setReceiverId(post.getWriter().getId()); // 여기서 receiver 설정 (예시)
310+
notificationRequest.setReceiverId(post.getWriter().getUser().getId()); // 여기서 receiver 설정 (예시)
311311
notificationRequest.setTargetId(post.getId());
312312
notificationRequest.setType(NotificationType.POST_REACTION); // 알림 타입 설정 (예시)
313313
notificationService.createNotification(user, treehouseId, notificationRequest, savedReaction.getReactionName());

0 commit comments

Comments
 (0)