From 8e1c693be572411cb15c321ccd963c3bf22c4f08 Mon Sep 17 00:00:00 2001
From: John Molakvoæ <skjnldsv@protonmail.com>
Date: Fri, 7 Jul 2023 15:41:05 +0200
Subject: fix(files_sharing): error and size/mtime for deleted shares
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
---
 apps/files_sharing/lib/Controller/DeletedShareAPIController.php | 2 ++
 apps/files_sharing/src/services/SharingService.ts               | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php
index 19d1cbd0af6..33bd9eeb4cd 100644
--- a/apps/files_sharing/lib/Controller/DeletedShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/DeletedShareAPIController.php
@@ -133,6 +133,8 @@ class DeletedShareAPIController extends OCSController {
 		$result['file_source'] = $node->getId();
 		$result['file_parent'] = $node->getParent()->getId();
 		$result['file_target'] = $share->getTarget();
+		$result['item_size'] = $node->getSize();
+		$result['item_mtime'] = $node->getMTime();
 
 		$expiration = $share->getExpirationDate();
 		if ($expiration !== null) {
diff --git a/apps/files_sharing/src/services/SharingService.ts b/apps/files_sharing/src/services/SharingService.ts
index 8543ebca4fc..8d11c223b5d 100644
--- a/apps/files_sharing/src/services/SharingService.ts
+++ b/apps/files_sharing/src/services/SharingService.ts
@@ -82,7 +82,7 @@ const ocsEntryToNode = function(ocsEntry: any): Folder | File | null {
 			},
 		})
 	} catch (error) {
-		logger.error('Error while parsing OCS entry', error)
+		logger.error('Error while parsing OCS entry', { error })
 		return null
 	}
 }
-- 
cgit v1.2.3