diff --git a/api/controllers/SignupController.php b/api/controllers/SignupController.php index 5c0cc8c..b7b5fcb 100644 --- a/api/controllers/SignupController.php +++ b/api/controllers/SignupController.php @@ -12,13 +12,13 @@ class SignupController extends Controller { public function behaviors() { return ArrayHelper::merge(parent::behaviors(), [ 'authenticator' => [ - 'except' => ['register', 'confirm'], + 'except' => ['index', 'confirm'], ], 'access' => [ 'class' => AccessControl::class, 'rules' => [ [ - 'actions' => ['register', 'confirm'], + 'actions' => ['index', 'confirm'], 'allow' => true, 'roles' => ['?'], ], @@ -34,7 +34,7 @@ class SignupController extends Controller { ]; } - public function actionRegister() { + public function actionIndex() { $model = new RegistrationForm(); $model->load(Yii::$app->request->post()); if (!$model->signup()) { diff --git a/tests/codeception/api/_pages/RegisterRoute.php b/tests/codeception/api/_pages/RegisterRoute.php index ec9cde7..89d166c 100644 --- a/tests/codeception/api/_pages/RegisterRoute.php +++ b/tests/codeception/api/_pages/RegisterRoute.php @@ -8,7 +8,7 @@ use yii\codeception\BasePage; */ class RegisterRoute extends BasePage { - public $route = ['signup/register']; + public $route = ['signup/index']; public function send(array $registrationData) { $this->actor->sendPOST($this->getUrl(), $registrationData);