Browse Source

Add includeTags to /share/id

tags/v25.0.0rc1
tobiasKaminsky 1 year ago
parent
commit
4a4a3874da
No account linked to committer's email address
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      apps/files_sharing/lib/Controller/ShareAPIController.php

+ 7
- 1
apps/files_sharing/lib/Controller/ShareAPIController.php View File

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

Loading…
Cancel
Save