0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-03-14 16:33:21 +00:00

enh: serialize path

Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
Christopher Ng 2023-07-31 12:10:50 -07:00
parent b04d1a70e2
commit db7f5a29f3

View file

@ -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