if ($this->canAccessShare($share)) {
try {
$share = $this->formatShare($share);
- return new DataResponse([$share]);
+ return new DataResponse(['data' => [$share]]);
} catch (NotFoundException $e) {
//Fall trough
}
$this->shareManager->deleteShare($share);
- return new DataResponse([]);
+ return new DataResponse();
}
/**
*/
$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);
$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);
$output = $this->formatShare($share);
- return new DataResponse($output);
+ return new DataResponse(['data' => $output]);
}
/**
}
}
- return new DataResponse($formatted);
+ return new DataResponse(['data' => $formatted]);
}
/**
}
}
- return new DataResponse($formatted);
+ return new DataResponse(['data' => $formatted]);
}
/**
}
}
- return new DataResponse($formatted);
+ return new DataResponse(['data' => $formatted]);
}
/**
throw new OCSBadRequestException($e->getMessage());
}
- return new DataResponse($this->formatShare($share));
+ return new DataResponse(['data' => $this->formatShare($share)]);
}
/**