the method was moved UserCard to Profile
This commit is contained in:
@ -4,6 +4,7 @@ namespace frontend\modules\api\controllers;
|
||||
|
||||
use common\services\ProfileService;
|
||||
use yii\web\BadRequestHttpException;
|
||||
use yii\web\ServerErrorHttpException;
|
||||
|
||||
class ProfileController extends ApiController
|
||||
{
|
||||
@ -15,7 +16,7 @@ class ProfileController extends ApiController
|
||||
];
|
||||
}
|
||||
|
||||
public function actionIndex($id = null)
|
||||
public function actionIndex($id = null): ?array
|
||||
{
|
||||
return ProfileService::getProfile($id, \Yii::$app->request->get());
|
||||
}
|
||||
@ -27,4 +28,12 @@ class ProfileController extends ApiController
|
||||
{
|
||||
return ProfileService::getProfileWithReportPermission($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ServerErrorHttpException
|
||||
*/
|
||||
public function actionGetMainData($user_id): array
|
||||
{
|
||||
return ProfileService::getMainData($user_id);
|
||||
}
|
||||
}
|
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace frontend\modules\api\controllers;
|
||||
|
||||
use common\services\UserCardService;
|
||||
use yii\web\ServerErrorHttpException;
|
||||
|
||||
class UserCardController extends ApiController
|
||||
{
|
||||
public function verbs(): array
|
||||
{
|
||||
return [
|
||||
'get-user-card' => ['get'],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ServerErrorHttpException
|
||||
*/
|
||||
public function actionGetUserCard($user_id): array
|
||||
{
|
||||
return UserCardService::getUserCard($user_id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user