From f41b1615a58044e73eb8942091f43d03c8c80cbc Mon Sep 17 00:00:00 2001 From: iIronside Date: Wed, 19 Oct 2022 15:42:26 +0300 Subject: [PATCH] rollback actionIndex in ProfileController --- .../modules/api/controllers/ProfileController.php | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/frontend/modules/api/controllers/ProfileController.php b/frontend/modules/api/controllers/ProfileController.php index c6e9a4f..0369ecc 100755 --- a/frontend/modules/api/controllers/ProfileController.php +++ b/frontend/modules/api/controllers/ProfileController.php @@ -10,13 +10,6 @@ use yii\web\ServerErrorHttpException; class ProfileController extends ApiController { -// public function verbs(): array -// { -// return [ -// '' => ['get'], -// 'profile-with-report-permission' => ['post', 'patch'] -// ]; -// } public function behaviors(): array { @@ -38,11 +31,7 @@ class ProfileController extends ApiController */ public function actionIndex($id = null): ?array { - $profiles = ProfileService::getProfile($id, \Yii::$app->request->get()); - if(empty($profiles)) { - throw new NotFoundHttpException('Profiles not found'); - } - return $profiles; + return ProfileService::getProfile($id, \Yii::$app->request->get()); } /**