diff --git a/common/models/UserQuestionnaire.php b/common/models/UserQuestionnaire.php index daf4899..9150bfc 100644 --- a/common/models/UserQuestionnaire.php +++ b/common/models/UserQuestionnaire.php @@ -173,7 +173,7 @@ class UserQuestionnaire extends ActiveRecord */ public static function getQuestionnaireId($uuid) { - return ArrayHelper::getValue(self::find()->where(['uuid' => $uuid])->one(), 'id'); + return ArrayHelper::getValue(self::find()->where(['uuid' => $uuid])->one(), 'questionnaire_id'); } public static function findActiveUserQuestionnaires($user_id): array diff --git a/frontend/modules/api/controllers/AnswerController.php b/frontend/modules/api/controllers/AnswerController.php index 603ad27..a49cee2 100644 --- a/frontend/modules/api/controllers/AnswerController.php +++ b/frontend/modules/api/controllers/AnswerController.php @@ -8,18 +8,18 @@ use yii\filters\auth\HttpBearerAuth; use yii\web\NotFoundHttpException; use yii\rest\Controller; -class AnswerController extends Controller +class AnswerController extends ApiController { - public function behaviors(): array - { - $behaviors = parent::behaviors(); - - $behaviors['authenticator']['authMethods'] = [ - HttpBearerAuth::className(), - ]; - - return $behaviors; - } +// public function behaviors(): array +// { +// $behaviors = parent::behaviors(); +// +// $behaviors['authenticator']['authMethods'] = [ +// HttpBearerAuth::className(), +// ]; +// +// return $behaviors; +// } public function verbs(): array { diff --git a/frontend/modules/api/controllers/QuestionController.php b/frontend/modules/api/controllers/QuestionController.php index c0a61dd..8344f8f 100644 --- a/frontend/modules/api/controllers/QuestionController.php +++ b/frontend/modules/api/controllers/QuestionController.php @@ -10,7 +10,7 @@ use yii\filters\auth\HttpBearerAuth; use yii\rest\Controller; use yii\web\NotFoundHttpException; -class QuestionController extends Controller +class QuestionController extends ApiController { public function behaviors() { diff --git a/frontend/modules/api/controllers/UserController.php b/frontend/modules/api/controllers/UserController.php index 84978af..c40fa1a 100755 --- a/frontend/modules/api/controllers/UserController.php +++ b/frontend/modules/api/controllers/UserController.php @@ -48,7 +48,7 @@ class UserController extends ActiveController 'X-Requested-With' ], ] - ] + ], ]); } diff --git a/frontend/modules/api/controllers/UserQuestionnaireController.php b/frontend/modules/api/controllers/UserQuestionnaireController.php index 5ea2436..3f54047 100644 --- a/frontend/modules/api/controllers/UserQuestionnaireController.php +++ b/frontend/modules/api/controllers/UserQuestionnaireController.php @@ -8,7 +8,7 @@ use yii\filters\auth\HttpBearerAuth; use yii\rest\Controller; use yii\web\NotFoundHttpException; -class UserQuestionnaireController extends Controller +class UserQuestionnaireController extends ApiController { public function behaviors() {