mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-18 05:20:50 +01:00
fix(openapi): Fix always empty data response of public share auth
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
a9be075531
commit
05b8e72859
1 changed files with 5 additions and 5 deletions
|
|
@ -49,7 +49,7 @@ class PublicShareAuthController extends OCSController {
|
|||
* otherwise.
|
||||
*
|
||||
* @param string $shareToken Token of the file share
|
||||
* @return DataResponse<Http::STATUS_CREATED, array{token: string, name: string, displayName: string}, array{}>|DataResponse<Http::STATUS_NOT_FOUND, array<empty>, array{}>
|
||||
* @return DataResponse<Http::STATUS_CREATED, array{token: string, name: string, displayName: string}, array{}>|DataResponse<Http::STATUS_NOT_FOUND, null, array{}>
|
||||
*
|
||||
* 201: Room created successfully
|
||||
* 404: Share not found
|
||||
|
|
@ -59,18 +59,18 @@ class PublicShareAuthController extends OCSController {
|
|||
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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue