getting api working

This commit is contained in:
Chris Smith
2025-02-20 16:41:41 +01:00
parent 1ab66464f2
commit c9533688ba
6 changed files with 15 additions and 4 deletions

View File

@@ -0,0 +1 @@
<?php

View File

@@ -7,9 +7,9 @@ $params = array_merge(
); );
return [ return [
'id' => 'app-backend', 'id' => 'calorie-api',
'basePath' => dirname(__DIR__), 'basePath' => dirname(__DIR__),
'controllerNamespace' => 'backend\controllers', 'controllerNamespace' => 'api\controllers',
'bootstrap' => ['log'], 'bootstrap' => ['log'],
'modules' => [], 'modules' => [],
'components' => [ 'components' => [
@@ -23,7 +23,7 @@ return [
], ],
'session' => [ 'session' => [
// this is the name of the session cookie used for login on the backend // this is the name of the session cookie used for login on the backend
'name' => 'advanced-backend', 'name' => 'calorie-api',
], ],
'log' => [ 'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0, 'traceLevel' => YII_DEBUG ? 3 : 0,

View File

@@ -0,0 +1,4 @@
<?php
return [
];

View File

@@ -0,0 +1,4 @@
<?php
return [
];

View File

@@ -1,6 +1,6 @@
<?php <?php
namespace backend\controllers; namespace api\controllers;
use common\models\LoginForm; use common\models\LoginForm;
use Yii; use Yii;

View File

@@ -32,6 +32,7 @@ return [
'Development' => [ 'Development' => [
'path' => 'dev', 'path' => 'dev',
'setWritable' => [ 'setWritable' => [
'api/runtime',
'console/runtime', 'console/runtime',
'frontend/runtime', 'frontend/runtime',
'frontend/web/assets', 'frontend/web/assets',
@@ -41,6 +42,7 @@ return [
'yii_test', 'yii_test',
], ],
'setCookieValidationKey' => [ 'setCookieValidationKey' => [
'api/config/main-local.php',
'common/config/codeception-local.php', 'common/config/codeception-local.php',
'frontend/config/main-local.php', 'frontend/config/main-local.php',
], ],