aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-07-31 12:10:50 -0700
committerChristopher Ng <chrng8@gmail.com>2023-08-03 15:30:11 -0700
commitdb7f5a29f36cddb793ee813d21ebdc717dfbb0ae (patch)
tree90ba1e7d445df32ea2beafa4c5e229a6c1b23303 /apps
parentb04d1a70e2d5b112e75b73edec5f13b76ee0dec0 (diff)
downloadnextcloud-server-db7f5a29f36cddb793ee813d21ebdc717dfbb0ae.tar.gz
nextcloud-server-db7f5a29f36cddb793ee813d21ebdc717dfbb0ae.zip
enh: serialize path
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps')
-rw-r--r--apps/files_reminders/lib/Model/RichReminder.php4
1 files changed, 2 insertions, 2 deletions
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