diff --git a/public/site/plugins/comments/routes/delete.php b/public/site/plugins/comments/routes/delete.php index b7b0895..f9dae6e 100644 --- a/public/site/plugins/comments/routes/delete.php +++ b/public/site/plugins/comments/routes/delete.php @@ -10,13 +10,13 @@ return [ $page = page($data->location->page->uri); $project = page($data->location->project->uri); $file = $page->file($data->location->file->uuid); - $isReply = $data->location->parentId ?? false; + $isReply = $data->location->parent->id ?? false; $comments = $file->comments()->isEmpty() == true ? [] : Yaml::decode($file->comments()->value()); foreach ($comments as $key => &$comment) { if ($isReply) { - if ($comment['id'] === $data->location->parentId) { + if ($comment['id'] === $data->location->parent->id) { foreach ($comment['replies'] as $replyKey => $reply) { if ($reply['id'] === $data->id) { unset($comment['replies'][$replyKey]); diff --git a/public/site/plugins/comments/routes/update.php b/public/site/plugins/comments/routes/update.php index ca875d4..4622ff2 100644 --- a/public/site/plugins/comments/routes/update.php +++ b/public/site/plugins/comments/routes/update.php @@ -10,13 +10,13 @@ return [ $page = page($data->location->page->uri); $project = page($data->location->project->uri); $file = $page->file($data->location->file->uuid); - $isReply = $data->location->parentId ?? false; + $isReply = $data->location->parent->id ?? false; $comments = $file->comments()->isEmpty() == true ? [] : Yaml::decode($file->comments()->value()); foreach ($comments as $key => &$comment) { if ($isReply) { - if ($comment['id'] === $data->location->parentId) { + if ($comment['id'] === $data->location->parent->id) { foreach ($comment['replies'] as $replyKey => $reply) { if ($reply['id'] === $data->id) { $comment['replies'][$replyKey]["text"] = $data->text; diff --git a/src/components/comments/Comment.vue b/src/components/comments/Comment.vue index ddeb9a7..aa9257f 100644 --- a/src/components/comments/Comment.vue +++ b/src/components/comments/Comment.vue @@ -21,13 +21,13 @@

-

+

{{ comment.text }}

-