reply comment working
This commit is contained in:
parent
2af56989c9
commit
8ed7331b61
5 changed files with 101 additions and 14 deletions
|
|
@ -5,5 +5,6 @@ Kirby::plugin('adrienpayet/pdc-comments', [
|
|||
require(__DIR__ . '/routes/create.php'),
|
||||
require(__DIR__ . '/routes/update.php'),
|
||||
require(__DIR__ . '/routes/delete.php'),
|
||||
require(__DIR__ . '/routes/reply.php'),
|
||||
]
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'pattern' => '(:all)create-comment.json',
|
||||
'pattern' => '(:all)reply-comment.json',
|
||||
'method' => 'POST',
|
||||
'action' => function () {
|
||||
$json = file_get_contents('php://input');
|
||||
|
|
@ -17,7 +17,7 @@ return [
|
|||
$newComment = [
|
||||
'pageUri' => $data->pageUri,
|
||||
'fileUuid' => (string) $file->uuid(),
|
||||
'filePageTarget' => $data->targetPage,
|
||||
'filePageIndex' => $data->filePageIndex,
|
||||
'text' => $data->text,
|
||||
'user' => [
|
||||
'name' => (string) $user->name(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue