From 4a4a3874da17105bad1eeba80e8b2e6c7ba4eb6c Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Mon, 19 Sep 2022 11:11:09 +0200 Subject: Add includeTags to /share/id --- apps/files_sharing/lib/Controller/ShareAPIController.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index 003d9336af5..068b9d12486 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -366,10 +366,11 @@ class ShareAPIController extends OCSController { * @NoAdminRequired * * @param string $id + * @param bool $includeTags * @return DataResponse * @throws OCSNotFoundException */ - public function getShare(string $id): DataResponse { + public function getShare(string $id, bool $includeTags = false): DataResponse { try { $share = $this->getShareById($id); } catch (ShareNotFound $e) { @@ -379,6 +380,11 @@ class ShareAPIController extends OCSController { try { if ($this->canAccessShare($share)) { $share = $this->formatShare($share); + + if ($includeTags) { + $share = Helper::populateTags($formatted, 'file_source', \OC::$server->getTagManager()); + } + return new DataResponse([$share]); } } catch (NotFoundException $e) { -- cgit v1.2.3