diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2016-08-10 22:36:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-10 22:36:25 +0200 |
commit | ba922c9f73c8b61998686d2273fbaccc7f88ed97 (patch) | |
tree | bb9b6985d64358b68ea5168e7a12b6dd08d58a9c /apps/files_sharing/lib | |
parent | 67d016833d637982a197bb848836c7afcea88358 (diff) | |
parent | 9544c97ffe888a16cdf58013b5a97056771eb856 (diff) | |
download | nextcloud-server-ba922c9f73c8b61998686d2273fbaccc7f88ed97.tar.gz nextcloud-server-ba922c9f73c8b61998686d2273fbaccc7f88ed97.zip |
Merge pull request #807 from nextcloud/ocs_dataresponse
OCSController requires DataResponse
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/API/Share20OCS.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/API/Share20OCS.php b/apps/files_sharing/lib/API/Share20OCS.php index 0cce05c3b17..2c0ed03f880 100644 --- a/apps/files_sharing/lib/API/Share20OCS.php +++ b/apps/files_sharing/lib/API/Share20OCS.php @@ -203,7 +203,7 @@ class Share20OCS extends OCSController { if ($this->canAccessShare($share)) { try { $share = $this->formatShare($share); - return new DataResponse(['data' => [$share]]); + return new DataResponse([$share]); } catch (NotFoundException $e) { //Fall trough } @@ -339,7 +339,7 @@ class Share20OCS extends OCSController { */ $existingShares = $this->shareManager->getSharesBy($this->currentUser->getUID(), \OCP\Share::SHARE_TYPE_LINK, $path, false, 1, 0); if (!empty($existingShares)) { - return new DataResponse(['data' => $this->formatShare($existingShares[0])]); + return new DataResponse($this->formatShare($existingShares[0])); } $publicUpload = $this->request->getParam('publicUpload', null); @@ -408,7 +408,7 @@ class Share20OCS extends OCSController { $output = $this->formatShare($share); - return new DataResponse(['data' => $output]); + return new DataResponse($output); } /** @@ -432,7 +432,7 @@ class Share20OCS extends OCSController { } } - return new DataResponse(['data' => $formatted]); + return new DataResponse($formatted); } /** @@ -466,7 +466,7 @@ class Share20OCS extends OCSController { } } - return new DataResponse(['data' => $formatted]); + return new DataResponse($formatted); } /** @@ -537,7 +537,7 @@ class Share20OCS extends OCSController { } } - return new DataResponse(['data' => $formatted]); + return new DataResponse($formatted); } /** @@ -671,7 +671,7 @@ class Share20OCS extends OCSController { throw new OCSBadRequestException($e->getMessage()); } - return new DataResponse(['data' => $this->formatShare($share)]); + return new DataResponse($this->formatShare($share)); } /** |