diff --git a/frontend/modules/api/controllers/ProfileController.php b/frontend/modules/api/controllers/ProfileController.php index 62acad1..87ab147 100755 --- a/frontend/modules/api/controllers/ProfileController.php +++ b/frontend/modules/api/controllers/ProfileController.php @@ -2,6 +2,8 @@ namespace frontend\modules\api\controllers; +use common\models\User; +use common\models\UserCard; use common\services\ProfileService; use yii\helpers\ArrayHelper; use yii\web\BadRequestHttpException; @@ -22,6 +24,7 @@ class ProfileController extends ApiController 'profile-with-report-permission' => ['post', 'patch'], 'get-main-data' => ['get'], 'positions-list' => ['get'], + 'level-list' => ['get'], ], ] ]); @@ -82,4 +85,30 @@ class ProfileController extends ApiController { return ProfileService::getPositionsList(); } + + /** + * + * @OA\Get(path="/profile/level-list", + * summary="Список уровней навыков", + * description="Получить список всех возможных уровней навыков", + * tags={"Profile"}, + * security={ + * {"bearerAuth": {}} + * }, + * @OA\Response( + * response=200, + * description="Возвращает массив позиций", + * @OA\MediaType( + * mediaType="application/json", + * ), + * + * ), + * ) + * + * @return array + */ + public function actionLevelList(): array + { + return UserCard::getLevelList(); + } } \ No newline at end of file