comments working
This commit is contained in:
parent
375bed1d01
commit
0b472988a2
14 changed files with 107 additions and 59 deletions
|
|
@ -8,12 +8,11 @@ return [
|
|||
$data = json_decode($json);
|
||||
|
||||
$page = page($data->location->page->uri);
|
||||
$project = page($data->location->project->uri);
|
||||
|
||||
$file = $page->file($data->location->file->uuid);
|
||||
$isReply = $data->location->parent->id ?? false;
|
||||
|
||||
$comments = $file->comments()->isEmpty() == true ? [] : Yaml::decode($file->comments()->value());
|
||||
|
||||
$isReply = $data->location->parent->id ?? false;
|
||||
foreach ($comments as $key => &$comment) {
|
||||
if ($isReply) {
|
||||
if ($comment['id'] === $data->location->parent->id) {
|
||||
|
|
@ -39,6 +38,7 @@ return [
|
|||
|
||||
echo json_encode(getFileData($newFile));
|
||||
|
||||
$project = $page->parents()->findBy("template", "project");
|
||||
$project->deleteNotification($data->id);
|
||||
|
||||
exit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue