mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-06 02:24:33 +08:00
#47 - Adds functionality to display child comments. Also has some code towards the reply functionality.
This commit is contained in:
@ -85,7 +85,11 @@ class CommentController extends Controller
|
||||
$this->checkOwnablePermission('page-view', $page);
|
||||
|
||||
$comments = $this->commentRepo->getCommentsForPage($pageId, $commentId);
|
||||
|
||||
if (empty($commentId)) {
|
||||
// requesting for parent level comments, send the total count as well.
|
||||
$totalComments = $this->commentRepo->getCommentCount($pageId);
|
||||
return response()->json(array('success' => true, 'comments'=> $comments, 'total' => $totalComments));
|
||||
}
|
||||
return response()->json(array('success' => true, 'comments'=> $comments));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user