mirror of
https://github.com/elyby/accounts.git
synced 2024-11-10 07:22:00 +05:30
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
$params = array_merge(
|
|
require(__DIR__ . '/../../common/config/params.php'),
|
|
require(__DIR__ . '/../../common/config/params-local.php'),
|
|
require(__DIR__ . '/params.php'),
|
|
require(__DIR__ . '/params-local.php')
|
|
);
|
|
|
|
return [
|
|
'id' => 'accounts-site-api',
|
|
'basePath' => dirname(__DIR__),
|
|
'bootstrap' => ['log'],
|
|
'controllerNamespace' => 'api\controllers',
|
|
'components' => [
|
|
'user' => [
|
|
'identityClass' => 'common\models\Account',
|
|
'enableAutoLogin' => true,
|
|
],
|
|
'log' => [
|
|
'traceLevel' => YII_DEBUG ? 3 : 0,
|
|
'targets' => [
|
|
[
|
|
'class' => 'yii\log\FileTarget',
|
|
'levels' => ['error', 'warning'],
|
|
],
|
|
],
|
|
],
|
|
'errorHandler' => [
|
|
'errorAction' => 'site/error',
|
|
],
|
|
'request' => [
|
|
'baseUrl' => '/api',
|
|
],
|
|
'urlManager' => [
|
|
'enablePrettyUrl' => true,
|
|
'showScriptName' => false,
|
|
'rules' => [],
|
|
],
|
|
],
|
|
'modules' => [
|
|
'login' => 'api\modules\login\Module',
|
|
],
|
|
'params' => $params,
|
|
];
|