add filters, refactoring
This commit is contained in:
@ -40,7 +40,7 @@ class AnswerController extends Controller
|
||||
throw new NotFoundHttpException('Incorrect questionnaire ID');
|
||||
}
|
||||
|
||||
$answers = Answer::getActiveAnswers($question_id);
|
||||
$answers = Answer::activeAnswers($question_id);
|
||||
if(empty($answers)) {
|
||||
throw new NotFoundHttpException('Active questionnaire not found');
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ class QuestionController extends \yii\rest\Controller
|
||||
throw new NotFoundHttpException('Incorrect questionnaire ID');
|
||||
}
|
||||
|
||||
$questions = Question::getActiveQuestions($questionnaire_id);
|
||||
$questions = Question::activeQuestions($questionnaire_id);
|
||||
if(empty($questions)) {
|
||||
throw new NotFoundHttpException('Active questionnaire not found');
|
||||
}
|
||||
|
Reference in New Issue
Block a user