Skip to content

Commit 5111f01

Browse files
mickenordinAndyScherzinger
authored andcommitted
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 55b980b commit 5111f01

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
@@ -15723,7 +15723,7 @@
1572315723
"required": [
1572415724
"recipientProvider",
1572515725
"token",
15726-
"userId",
15726+
"userID",
1572715727
"email",
1572815728
"name"
1572915729
],
@@ -15736,9 +15736,9 @@
1573615736
"type": "string",
1573715737
"description": "The token used for the invitation"
1573815738
},
15739-
"userId": {
15739+
"userID": {
1574015740
"type": "string",
15741-
"description": "The userId of the recipient at the recipient's provider"
15741+
"description": "The userID of the recipient at the recipient's provider"
1574215742
},
1574315743
"email": {
1574415744
"type": "string",

0 commit comments

Comments
 (0)