From 722c6b198eb0fb05e24bb95469bc44ae1eb64c3f Mon Sep 17 00:00:00 2001 From: isUnknown Date: Mon, 28 Oct 2024 16:52:59 +0100 Subject: [PATCH] send comment notification working --- ...r-de-bureaux-artistiquement-consideree.pdf.txt | 15 +++++++++++---- public/site/config/routes/add-comment.php | 4 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/38969543_extrait-de-louis-sullivan-form-follow-function.-de-la-tour-de-bureaux-artistiquement-consideree.pdf.txt b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/38969543_extrait-de-louis-sullivan-form-follow-function.-de-la-tour-de-bureaux-artistiquement-consideree.pdf.txt index 8249d86..dd08926 100644 --- a/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/38969543_extrait-de-louis-sullivan-form-follow-function.-de-la-tour-de-bureaux-artistiquement-consideree.pdf.txt +++ b/public/content/projects/1_miss-dior-blooming-bouquet/1_client-brief/38969543_extrait-de-louis-sullivan-form-follow-function.-de-la-tour-de-bureaux-artistiquement-consideree.pdf.txt @@ -13,10 +13,17 @@ Template: document Comments: 1: - m2t543hr: + m2t7307h: fileUuid: file://s0lNtRA0Z7ybTCWG page: 1 - text: Un autre commentaire + text: Un commentaire username: Adrien Payet - date: 2024-10-28T15:54:43+01:00 - id: m2t543hr \ No newline at end of file + date: 2024-10-28T16:49:51+01:00 + id: m2t7307h + m2t76m4t: + fileUuid: file://s0lNtRA0Z7ybTCWG + page: 1 + text: Autre commentaire + username: Utilisateur Dior + date: 2024-10-28T16:52:39+01:00 + id: m2t76m4t \ No newline at end of file diff --git a/public/site/config/routes/add-comment.php b/public/site/config/routes/add-comment.php index e1fa1b8..716d481 100644 --- a/public/site/config/routes/add-comment.php +++ b/public/site/config/routes/add-comment.php @@ -12,10 +12,10 @@ return [ $user = kirby()->user($data->userUuid); - $comments = $file->comments()->isEmpty() == true ? [] : []; + $comments = $file->comments()->isEmpty() == true ? [] : Yaml::decode($file->comments()->value()); $newComment = [ - 'fileUuid' => (string )$file->uuid(), + 'fileUuid' => (string) $file->uuid(), 'page' => $data->targetPage, 'text' => $data->text, 'username' => $user->name()->isNotEmpty() ? (string) $user->name() : (string) $user->email(),