mirror of
https://github.com/elyby/accounts.git
synced 2024-11-27 01:02:06 +05:30
Исправлено поведение hasJoined операции для legacy протокола
This commit is contained in:
parent
014380c82b
commit
d262e577a6
@ -89,15 +89,12 @@ class SessionController extends ApiController {
|
||||
$hasJoinedForm = new HasJoinedForm($protocol);
|
||||
try {
|
||||
$hasJoinedForm->hasJoined();
|
||||
} catch (ForbiddenOperationException $e) {
|
||||
return 'NO';
|
||||
} catch (SessionServerException $e) {
|
||||
Yii::$app->response->statusCode = $e->statusCode;
|
||||
if ($e instanceof ForbiddenOperationException) {
|
||||
$message = 'NO';
|
||||
} else {
|
||||
$message = $e->getMessage();
|
||||
}
|
||||
|
||||
return $message;
|
||||
return $e->getMessage();
|
||||
}
|
||||
|
||||
return 'YES';
|
||||
|
@ -44,7 +44,7 @@ class HasJoinedLegacyCest {
|
||||
'user' => 'random-username',
|
||||
'serverId' => Uuid::uuid(),
|
||||
]);
|
||||
$I->seeResponseCodeIs(401);
|
||||
$I->seeResponseCodeIs(200);
|
||||
$I->canSeeResponseEquals('NO');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user