From b6efaeb6db18215e833c713504a3f945c2d51767 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 21 Nov 2024 11:59:35 +0100 Subject: [PATCH] fix(openapi): Fix always empty data response of public share auth Signed-off-by: Joas Schilling --- lib/Controller/PublicShareAuthController.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Controller/PublicShareAuthController.php b/lib/Controller/PublicShareAuthController.php index f40882b1915..c1129d722fd 100644 --- a/lib/Controller/PublicShareAuthController.php +++ b/lib/Controller/PublicShareAuthController.php @@ -49,7 +49,7 @@ public function __construct( * otherwise. * * @param string $shareToken Token of the file share - * @return DataResponse|DataResponse, array{}> + * @return DataResponse|DataResponse * * 201: Room created successfully * 404: Share not found @@ -59,18 +59,18 @@ public function __construct( public function createRoom(string $shareToken): DataResponse { try { $share = $this->shareManager->getShareByToken($shareToken); - } catch (ShareNotFound $e) { - return new DataResponse([], Http::STATUS_NOT_FOUND); + } catch (ShareNotFound) { + return new DataResponse(null, Http::STATUS_NOT_FOUND); } if (!$share->getSendPasswordByTalk()) { - return new DataResponse([], Http::STATUS_NOT_FOUND); + return new DataResponse(null, Http::STATUS_NOT_FOUND); } $sharerUser = $this->userManager->get($share->getSharedBy()); if (!$sharerUser instanceof IUser) { - return new DataResponse([], Http::STATUS_NOT_FOUND); + return new DataResponse(null, Http::STATUS_NOT_FOUND); } if ($share->getShareType() === IShare::TYPE_EMAIL) {