From: Christopher Ng Date: Mon, 31 Jul 2023 19:10:50 +0000 (-0700) Subject: enh: serialize path X-Git-Tag: v28.0.0beta1~601^2~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=db7f5a29f36cddb793ee813d21ebdc717dfbb0ae;p=nextcloud-server.git enh: serialize path Signed-off-by: Christopher Ng --- diff --git a/apps/files_reminders/lib/Model/RichReminder.php b/apps/files_reminders/lib/Model/RichReminder.php index 1ac1baae370..10dc89799fe 100644 --- a/apps/files_reminders/lib/Model/RichReminder.php +++ b/apps/files_reminders/lib/Model/RichReminder.php @@ -45,8 +45,7 @@ class RichReminder extends Reminder implements JsonSerializable { * @throws NodeNotFoundException */ public function getNode(): Node { - $userFolder = $this->root->getUserFolder($this->getUserId()); - $nodes = $userFolder->getById($this->getFileId()); + $nodes = $this->root->getUserFolder($this->getUserId())->getById($this->getFileId()); if (empty($nodes)) { throw new NodeNotFoundException(); } @@ -66,6 +65,7 @@ class RichReminder extends Reminder implements JsonSerializable { return [ 'userId' => $this->getUserId(), 'fileId' => $this->getFileId(), + 'path' => $this->getNode()->getPath(), 'dueDate' => $this->getDueDate()->format(DateTimeInterface::ATOM), // ISO 8601 'updatedAt' => $this->getUpdatedAt()->format(DateTimeInterface::ATOM), // ISO 8601 'createdAt' => $this->getCreatedAt()->format(DateTimeInterface::ATOM), // ISO 8601