Merge pull request #8020 from owncloud/setRecipientTypeInBody

apiTest. set recipient type in body
This commit is contained in:
Prarup Gurung
2023-12-20 10:27:54 +05:45
committed by GitHub
2 changed files with 5 additions and 0 deletions

View File

@@ -1579,6 +1579,7 @@ class GraphHelper {
* @param string $spaceId
* @param string $itemId
* @param string $shareeId
* @param string $shareType
* @param string|null $role
*
* @return ResponseInterface
@@ -1592,12 +1593,15 @@ class GraphHelper {
string $spaceId,
string $itemId,
string $shareeId,
string $shareType,
?string $role
): ResponseInterface {
$url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/invite");
$body = [];
$recipients['objectId'] = $shareeId;
$recipients['@libre.graph.recipient.type'] = $shareType;
$body['recipients'] = [$recipients];
if ($role !== null) {

View File

@@ -112,6 +112,7 @@ class SharingNgContext implements Context {
$spaceId,
$itemId,
$shareeId,
$rows['shareType'],
$rows['role']
)
);