From e82b8aa8cfb3d2d8604ba56445c7cb204becd823 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Mon, 23 Jan 2017 14:38:21 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=20=D0=B7=D0=B0=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=20/currect=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=20=D0=B2=D1=8B=D0=B2=D0=BE=D0=B4=20=D1=81=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=BE=D1=8F=D0=BD=D0=B8=D1=8F=20=D0=B2=D0=BA=D0=BB=D1=8E=D1=87?= =?UTF-8?q?=D1=91=D0=BD=D0=BD=D0=BE=D1=81=D1=82=D0=B8=20OTP=20=D0=B0=D0=B2?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/controllers/AccountsController.php | 1 + tests/codeception/api/functional/AccountsCurrentCest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/api/controllers/AccountsController.php b/api/controllers/AccountsController.php index cec7384..ec3fdba 100644 --- a/api/controllers/AccountsController.php +++ b/api/controllers/AccountsController.php @@ -69,6 +69,7 @@ class AccountsController extends Controller { 'passwordChangedAt' => $account->password_changed_at, 'hasMojangUsernameCollision' => $account->hasMojangUsernameCollision(), 'shouldAcceptRules' => !$account->isAgreedWithActualRules(), + 'isOtpEnabled' => (bool)$account->is_otp_enabled, ]; } diff --git a/tests/codeception/api/functional/AccountsCurrentCest.php b/tests/codeception/api/functional/AccountsCurrentCest.php index cc4daa2..ef4e4df 100644 --- a/tests/codeception/api/functional/AccountsCurrentCest.php +++ b/tests/codeception/api/functional/AccountsCurrentCest.php @@ -29,6 +29,7 @@ class AccountsCurrentCest { 'isActive' => true, 'hasMojangUsernameCollision' => false, 'shouldAcceptRules' => false, + 'isOtpEnabled' => false, ]); $I->canSeeResponseJsonMatchesJsonPath('$.passwordChangedAt'); }