Skip to content

Commit 276638b

Browse files
authored
Merge pull request #50 from Lions-Forest/notification
fix: targetId 변경
2 parents 126c19b + c9536e4 commit 276638b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/java/com/example/lionsforest/domain/comment/service/CommentService.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public CommentResponseDto createComment(Long groupId, CommentRequestDto dto, Lon
7373
.user(part.getUser())
7474
.content(content)
7575
.photo(photoPath)
76-
.targetId(comment.getCommentId())
77-
.targetType(TargetType.COMMENT)
76+
.targetId(groupId)
77+
.targetType(TargetType.GROUP)
7878
.build();
7979
notificationRepository.save(notification);
8080
}
@@ -148,8 +148,8 @@ public String toggleLike(Long commentId, Long userId){
148148
.user(author)
149149
.content(content)
150150
.photo(photoPath)
151-
.targetId(commentId)
152-
.targetType(TargetType.COMMENT)
151+
.targetId(group.getId())
152+
.targetType(TargetType.GROUP)
153153
.build();
154154
notificationRepository.save(notification);
155155
}

src/main/java/com/example/lionsforest/domain/review/service/ReviewService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ public ReviewResponseDto createReview(Long groupId,
107107
.user(part.getUser())
108108
.content(content)
109109
.photo(photoPath)
110-
.targetId(review.getId())
111-
.targetType(TargetType.REVIEW)
110+
.targetId(groupId)
111+
.targetType(TargetType.GROUP)
112112
.build();
113113
notificationRepository.save(notification);
114114
}

0 commit comments

Comments
 (0)