mirror of
				https://github.com/elyby/accounts.git
				synced 2025-05-31 14:11:46 +05:30 
			
		
		
		
	Исправлено поведение hasJoined операции для legacy протокола
This commit is contained in:
		@@ -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');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user