summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib/Controller/ShareAPIController.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib/Controller/ShareAPIController.php')
-rw-r--r--apps/files_sharing/lib/Controller/ShareAPIController.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php
index d30d5a05a22..816ecde9c40 100644
--- a/apps/files_sharing/lib/Controller/ShareAPIController.php
+++ b/apps/files_sharing/lib/Controller/ShareAPIController.php
@@ -698,17 +698,21 @@ class ShareAPIController extends OCSController {
* @param string $password
* @param string $publicUpload
* @param string $expireDate
+ * @param string $note
* @return DataResponse
- * @throws OCSNotFoundException
+ * @throws LockedException
+ * @throws NotFoundException
* @throws OCSBadRequestException
* @throws OCSForbiddenException
+ * @throws OCSNotFoundException
*/
public function updateShare(
string $id,
int $permissions = null,
string $password = null,
string $publicUpload = null,
- string $expireDate = null
+ string $expireDate = null,
+ string $note = null
): DataResponse {
try {
$share = $this->getShareById($id);
@@ -722,10 +726,14 @@ class ShareAPIController extends OCSController {
throw new OCSNotFoundException($this->l->t('Wrong share ID, share doesn\'t exist'));
}
- if ($permissions === null && $password === null && $publicUpload === null && $expireDate === null) {
+ if ($permissions === null && $password === null && $publicUpload === null && $expireDate === null && $note === null) {
throw new OCSBadRequestException($this->l->t('Wrong or no update parameter given'));
}
+ if($note !== null) {
+ $share->setNote($note);
+ }
+
/*
* expirationdate, password and publicUpload only make sense for link shares
*/