feat: show correct reply counts

This commit is contained in:
Tim
2025-08-05 12:44:50 +08:00
parent 2e8bc012fa
commit c65dfbcbf9
5 changed files with 16 additions and 5 deletions

View File

@@ -186,6 +186,13 @@ public class CommentService {
return time;
}
public long countComments(Long postId) {
log.debug("countComments called for post {}", postId);
long count = commentRepository.countByPostId(postId);
log.debug("countComments for post {} is {}", postId, count);
return count;
}
@Transactional
public void deleteComment(String username, Long id) {
log.debug("deleteComment called by user {} for comment {}", username, id);