From 48ff8fa539ab76070aa3bf7eeef9bce8b967fb7b Mon Sep 17 00:00:00 2001 From: koojun99 Date: Mon, 9 Sep 2024 19:57:40 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20=EC=95=8C=EB=A6=BC=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=EC=9D=B4=20=ED=95=84=EC=9A=94=ED=95=9C=20?= =?UTF-8?q?=EB=A1=9C=EC=A7=81=EB=93=A4=EC=97=90=EC=84=9C=20userId=EB=A5=BC?= =?UTF-8?q?=20=EC=A7=80=EC=A0=95=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../treehouse/server/api/comment/business/CommentService.java | 2 +- .../java/treehouse/server/api/post/business/PostService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/treehouse/server/api/comment/business/CommentService.java b/src/main/java/treehouse/server/api/comment/business/CommentService.java index 2259fd8..83968ca 100644 --- a/src/main/java/treehouse/server/api/comment/business/CommentService.java +++ b/src/main/java/treehouse/server/api/comment/business/CommentService.java @@ -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); diff --git a/src/main/java/treehouse/server/api/post/business/PostService.java b/src/main/java/treehouse/server/api/post/business/PostService.java index 42491fa..3b2eec9 100644 --- a/src/main/java/treehouse/server/api/post/business/PostService.java +++ b/src/main/java/treehouse/server/api/post/business/PostService.java @@ -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());