|
|
@@ -203,7 +203,7 @@ class Share20OCS extends OCSController { |
|
|
|
if ($this->canAccessShare($share)) { |
|
|
|
try { |
|
|
|
$share = $this->formatShare($share); |
|
|
|
return new DataResponse([$share]); |
|
|
|
return new DataResponse(['data' => [$share]]); |
|
|
|
} catch (NotFoundException $e) { |
|
|
|
//Fall trough |
|
|
|
} |
|
|
@@ -240,7 +240,7 @@ class Share20OCS extends OCSController { |
|
|
|
|
|
|
|
$this->shareManager->deleteShare($share); |
|
|
|
|
|
|
|
return new DataResponse([]); |
|
|
|
return new DataResponse(); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -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($this->formatShare($existingShares[0])); |
|
|
|
return new DataResponse(['data' => $this->formatShare($existingShares[0])]); |
|
|
|
} |
|
|
|
|
|
|
|
$publicUpload = $this->request->getParam('publicUpload', null); |
|
|
@@ -391,7 +391,7 @@ class Share20OCS extends OCSController { |
|
|
|
$share->setSharedWith($shareWith); |
|
|
|
$share->setPermissions($permissions); |
|
|
|
} else { |
|
|
|
throw new OCSBadRequestException($this->l->t('Unknown share type'); |
|
|
|
throw new OCSBadRequestException($this->l->t('Unknown share type')); |
|
|
|
} |
|
|
|
|
|
|
|
$share->setShareType($shareType); |
|
|
@@ -408,7 +408,7 @@ class Share20OCS extends OCSController { |
|
|
|
|
|
|
|
$output = $this->formatShare($share); |
|
|
|
|
|
|
|
return new DataResponse($output); |
|
|
|
return new DataResponse(['data' => $output]); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -432,7 +432,7 @@ class Share20OCS extends OCSController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return new DataResponse($formatted); |
|
|
|
return new DataResponse(['data' => $formatted]); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -466,7 +466,7 @@ class Share20OCS extends OCSController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return new DataResponse($formatted); |
|
|
|
return new DataResponse(['data' => $formatted]); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -537,7 +537,7 @@ class Share20OCS extends OCSController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return new DataResponse($formatted); |
|
|
|
return new DataResponse(['data' => $formatted]); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@@ -671,7 +671,7 @@ class Share20OCS extends OCSController { |
|
|
|
throw new OCSBadRequestException($e->getMessage()); |
|
|
|
} |
|
|
|
|
|
|
|
return new DataResponse($this->formatShare($share)); |
|
|
|
return new DataResponse(['data' => $this->formatShare($share)]); |
|
|
|
} |
|
|
|
|
|
|
|
/** |