response 400

This commit is contained in:
andrey 2021-08-16 15:59:56 +03:00
parent 6f7c497d80
commit 9c948774e0

View File

@ -67,7 +67,8 @@ class ProfileController extends \yii\rest\Controller
return ['status' => 'success'];
}
return ['status' => 'error'];
\Yii::$app->response->statusCode = 400;
return ['status' => 'error', 'errors' => $model->errors];
}
}