diff --git a/backend/config/main.php b/backend/config/main.php index 352b926..d38b41a 100644 --- a/backend/config/main.php +++ b/backend/config/main.php @@ -16,7 +16,10 @@ return [ ], 'components' => [ 'request' => [ - 'csrfParam' => '_csrf-backend', + 'parsers' => [ + 'application/json' => 'yii\web\JsonParser', + ], + 'csrfParam' => '_csrf-api', ], 'user' => [ 'identityClass' => 'common\models\User', diff --git a/vendor/antgoods/goods/src/controllers/GoodsController.php b/vendor/antgoods/goods/src/controllers/GoodsController.php index 9f9941d..dc67b12 100644 --- a/vendor/antgoods/goods/src/controllers/GoodsController.php +++ b/vendor/antgoods/goods/src/controllers/GoodsController.php @@ -13,6 +13,7 @@ use yii\web\NotFoundHttpException; use yii\filters\VerbFilter; use antgoods\goods\logic\goods\GoodsManager; use common\models\ars\File; +use yii\web\Response; /** * GoodsController implements the CRUD actions for Goods model.