Skip to content

Commit 7b7e332

Browse files
committed
fix(cloud-federation-api): align inviteAccepted parameter naming with spec
- Rename method parameter from `userId` to `userID`. - Update log message and `setRecipientUserId` call to use new variable. - Without this change, we can not accept invites. Signed-off-by: Micke Nordin <kano@sunet.se>
1 parent dbc8833 commit 7b7e332

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

apps/cloud_federation_api/lib/Controller/RequestHandlerController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public function addShare($shareWith, $name, $description, $providerId, $owner, $
236236
*
237237
* @param string $recipientProvider The address of the recipent's provider
238238
* @param string $token The token used for the invitation
239-
* @param string $userId The userId of the recipient at the recipient's provider
239+
* @param string $userID The userID of the recipient at the recipient's provider
240240
* @param string $email The email address of the recipient
241241
* @param string $name The display name of the recipient
242242
*
@@ -251,8 +251,8 @@ public function addShare($shareWith, $name, $description, $providerId, $owner, $
251251
#[PublicPage]
252252
#[NoCSRFRequired]
253253
#[BruteForceProtection(action: 'inviteAccepted')]
254-
public function inviteAccepted(string $recipientProvider, string $token, string $userId, string $email, string $name): JSONResponse {
255-
$this->logger->debug('Processing share invitation for ' . $userId . ' with token ' . $token . ' and email ' . $email . ' and name ' . $name);
254+
public function inviteAccepted(string $recipientProvider, string $token, string $userID, string $email, string $name): JSONResponse {
255+
$this->logger->debug('Processing share invitation for ' . $userID . ' with token ' . $token . ' and email ' . $email . ' and name ' . $name);
256256

257257
$updated = $this->timeFactory->getTime();
258258

@@ -309,7 +309,7 @@ public function inviteAccepted(string $recipientProvider, string $token, string
309309
$invitation->setRecipientEmail($email);
310310
$invitation->setRecipientName($name);
311311
$invitation->setRecipientProvider($recipientProvider);
312-
$invitation->setRecipientUserId($userId);
312+
$invitation->setRecipientUserId($userID);
313313
$invitation->setAcceptedAt($updated);
314314
$invitation = $this->federatedInviteMapper->update($invitation);
315315

apps/cloud_federation_api/openapi.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@
354354
"required": [
355355
"recipientProvider",
356356
"token",
357-
"userId",
357+
"userID",
358358
"email",
359359
"name"
360360
],
@@ -367,9 +367,9 @@
367367
"type": "string",
368368
"description": "The token used for the invitation"
369369
},
370-
"userId": {
370+
"userID": {
371371
"type": "string",
372-
"description": "The userId of the recipient at the recipient's provider"
372+
"description": "The userID of the recipient at the recipient's provider"
373373
},
374374
"email": {
375375
"type": "string",

openapi.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15768,7 +15768,7 @@
1576815768
"required": [
1576915769
"recipientProvider",
1577015770
"token",
15771-
"userId",
15771+
"userID",
1577215772
"email",
1577315773
"name"
1577415774
],
@@ -15781,9 +15781,9 @@
1578115781
"type": "string",
1578215782
"description": "The token used for the invitation"
1578315783
},
15784-
"userId": {
15784+
"userID": {
1578515785
"type": "string",
15786-
"description": "The userId of the recipient at the recipient's provider"
15786+
"description": "The userID of the recipient at the recipient's provider"
1578715787
},
1578815788
"email": {
1578915789
"type": "string",

0 commit comments

Comments
 (0)