From 5111f0134978e015e36e17bdc03e97e76eddc0b0 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Fri, 3 Oct 2025 13:34:26 +0200 Subject: [PATCH] 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 --- .../lib/Controller/RequestHandlerController.php | 8 ++++---- apps/cloud_federation_api/openapi.json | 6 +++--- openapi.json | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php index a76b1884a0b..e15d57181a3 100644 --- a/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php +++ b/apps/cloud_federation_api/lib/Controller/RequestHandlerController.php @@ -236,7 +236,7 @@ class RequestHandlerController extends Controller { * * @param string $recipientProvider The address of the recipent's provider * @param string $token The token used for the invitation - * @param string $userId The userId of the recipient at the recipient's provider + * @param string $userID The userID of the recipient at the recipient's provider * @param string $email The email address of the recipient * @param string $name The display name of the recipient * @@ -251,8 +251,8 @@ class RequestHandlerController extends Controller { #[PublicPage] #[NoCSRFRequired] #[BruteForceProtection(action: 'inviteAccepted')] - public function inviteAccepted(string $recipientProvider, string $token, string $userId, string $email, string $name): JSONResponse { - $this->logger->debug('Processing share invitation for ' . $userId . ' with token ' . $token . ' and email ' . $email . ' and name ' . $name); + public function inviteAccepted(string $recipientProvider, string $token, string $userID, string $email, string $name): JSONResponse { + $this->logger->debug('Processing share invitation for ' . $userID . ' with token ' . $token . ' and email ' . $email . ' and name ' . $name); $updated = $this->timeFactory->getTime(); @@ -309,7 +309,7 @@ class RequestHandlerController extends Controller { $invitation->setRecipientEmail($email); $invitation->setRecipientName($name); $invitation->setRecipientProvider($recipientProvider); - $invitation->setRecipientUserId($userId); + $invitation->setRecipientUserId($userID); $invitation->setAcceptedAt($updated); $invitation = $this->federatedInviteMapper->update($invitation); diff --git a/apps/cloud_federation_api/openapi.json b/apps/cloud_federation_api/openapi.json index 9c92a152bf8..21f669a2c5f 100644 --- a/apps/cloud_federation_api/openapi.json +++ b/apps/cloud_federation_api/openapi.json @@ -354,7 +354,7 @@ "required": [ "recipientProvider", "token", - "userId", + "userID", "email", "name" ], @@ -367,9 +367,9 @@ "type": "string", "description": "The token used for the invitation" }, - "userId": { + "userID": { "type": "string", - "description": "The userId of the recipient at the recipient's provider" + "description": "The userID of the recipient at the recipient's provider" }, "email": { "type": "string", diff --git a/openapi.json b/openapi.json index f0de68e6f05..c546d46aa82 100644 --- a/openapi.json +++ b/openapi.json @@ -15723,7 +15723,7 @@ "required": [ "recipientProvider", "token", - "userId", + "userID", "email", "name" ], @@ -15736,9 +15736,9 @@ "type": "string", "description": "The token used for the invitation" }, - "userId": { + "userID": { "type": "string", - "description": "The userId of the recipient at the recipient's provider" + "description": "The userID of the recipient at the recipient's provider" }, "email": { "type": "string",