diff options
author | tobiasKaminsky <tobias@kaminsky.me> | 2022-09-19 11:11:09 +0200 |
---|---|---|
committer | tobiasKaminsky <tobias@kaminsky.me> | 2022-09-19 11:11:09 +0200 |
commit | 4a4a3874da17105bad1eeba80e8b2e6c7ba4eb6c (patch) | |
tree | b90ed40788ea6efeb14049989449b7b33d9bf220 | |
parent | 3950deb42fa9c7c5805e5047d07c988d59e57eb9 (diff) | |
download | nextcloud-server-4a4a3874da17105bad1eeba80e8b2e6c7ba4eb6c.tar.gz nextcloud-server-4a4a3874da17105bad1eeba80e8b2e6c7ba4eb6c.zip |
Add includeTags to /share/id
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareAPIController.php | 8 |
1 files changed, 7 insertions, 1 deletions
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) { |