apiTest. set recipient type in body

This commit is contained in:
Viktor Scharf
2023-12-19 23:28:52 +01:00
parent bce38f965f
commit 4e6bdc1688
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -1579,7 +1579,8 @@ class GraphHelper {
* @param string $spaceId * @param string $spaceId
* @param string $itemId * @param string $itemId
* @param string $shareeId * @param string $shareeId
* @param string|null $role * @param string $shareType
* @param string|null $role
* *
* @return ResponseInterface * @return ResponseInterface
* @throws \JsonException * @throws \JsonException
@@ -1592,12 +1593,15 @@ class GraphHelper {
string $spaceId, string $spaceId,
string $itemId, string $itemId,
string $shareeId, string $shareeId,
string $shareType,
?string $role ?string $role
): ResponseInterface { ): ResponseInterface {
$url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/invite"); $url = self::getBetaFullUrl($baseUrl, "drives/$spaceId/items/$itemId/invite");
$body = []; $body = [];
$recipients['objectId'] = $shareeId; $recipients['objectId'] = $shareeId;
$recipients['@libre.graph.recipient.type'] = $shareType;
$body['recipients'] = [$recipients]; $body['recipients'] = [$recipients];
if ($role !== null) { if ($role !== null) {
@@ -112,6 +112,7 @@ class SharingNgContext implements Context {
$spaceId, $spaceId,
$itemId, $itemId,
$shareeId, $shareeId,
$rows['shareType'],
$rows['role'] $rows['role']
) )
); );