This commit is contained in:
Kavalar 2023-04-19 23:44:52 +03:00
parent ea7c781d06
commit b24125ac66
3 changed files with 26 additions and 3 deletions

View File

@ -0,0 +1,23 @@
<?php
use yii\db\Migration;
/**
* Handles dropping columns from table `{{%manager}}`.
*/
class m230419_100612_drop_user_card_id_column_from_manager_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
}
/**
* {@inheritdoc}
*/
public function safeDown()
{
}
}

View File

@ -26,7 +26,7 @@ use yii\web\Response;
* ),
*
* @OA\Server(
* url="https://guild.loc/api",
* url="http://guild.loc/api",
* description="Локальный сервер",
* ),
*
@ -49,6 +49,7 @@ class ApiController extends Controller
'class' => GsCors::class,
'cors' => [
'Origin' => ['*'],
'Access-Control-Request-Methods' => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'],
//'Access-Control-Allow-Credentials' => true,
'Access-Control-Allow-Headers' => [
'Access-Control-Allow-Origin',

View File

@ -330,8 +330,7 @@ class RequestController extends ApiController
$put = array_diff(\Yii::$app->request->getBodyParams(), [null, '']);
$requestService->load($put, '')
->save();
$requestService->load($put, '')->save();
if (!$requestService->isSave) {
throw new BadRequestHttpException(json_encode($requestService->errors));