aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2016-07-20 10:44:52 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2016-08-05 14:17:31 +0200
commit4504d7f5e9f416d33946c3364426235c92222448 (patch)
treeb78fddf69951d8b51ea329b764f0b890bcc35320 /apps
parent7fdc2f32fa442b84579acfe94fd8c44866d9b2bd (diff)
downloadnextcloud-server-4504d7f5e9f416d33946c3364426235c92222448.tar.gz
nextcloud-server-4504d7f5e9f416d33946c3364426235c92222448.zip
DataResponse required ['data' => DATA]
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/API/Share20OCS.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/files_sharing/lib/API/Share20OCS.php b/apps/files_sharing/lib/API/Share20OCS.php
index aebda5d8512..7dee1c7b67c 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([$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)]);
}
/**