fix
This commit is contained in:
parent
4cbb004c4d
commit
daee4e3e68
@ -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
|
||||
|
@ -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
|
||||
{
|
||||
|
@ -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()
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ class UserController extends ActiveController
|
||||
'X-Requested-With'
|
||||
],
|
||||
]
|
||||
]
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user