]> BookStack Code Mirror - bookstack/blobdiff - app/Activity/Controllers/CommentController.php
Comments: Added back-end content reference handling
[bookstack] / app / Activity / Controllers / CommentController.php
index 52ccc823864e9e6e3221580b080aa0019968eb40..2620800678406b5b0607a3cd551849cee1b74d8a 100644 (file)
@@ -26,6 +26,7 @@ class CommentController extends Controller
         $input = $this->validate($request, [
             'html'      => ['required', 'string'],
             'parent_id' => ['nullable', 'integer'],
+            'content_ref' => ['string'],
         ]);
 
         $page = $this->pageQueries->findVisibleById($pageId);
@@ -40,7 +41,7 @@ class CommentController extends Controller
 
         // Create a new comment.
         $this->checkPermission('comment-create-all');
-        $comment = $this->commentRepo->create($page, $input['html'], $input['parent_id'] ?? null);
+        $comment = $this->commentRepo->create($page, $input['html'], $input['parent_id'] ?? null, $input['content_ref']);
 
         return view('comments.comment-branch', [
             'readOnly' => false,