Skip to content

Commit

Permalink
fix: fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
forecho committed Feb 12, 2020
1 parent f335b7b commit 607e5f6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/actions/ActionAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ public function run()
Yii::$app->response->format = Response::FORMAT_JSON;
/** @var ActionStore $model */
$model = Yii::createObject($this->actionClass);
$model->
$model->load(array_merge(Yii::$app->request->getQueryParams(), ['user_id' => Yii::$app->user->id]), '');

if ($model->validate()) {
Expand Down Expand Up @@ -81,7 +80,7 @@ protected function createUpdateAction($model)
break;
}
if ($didModel = $model::find()->filterWhere($data)->one()) {
if (!in_array($didModel->type, [$this->counterType])) {
if (!in_array($didModel->type, $this->counterType)) {
return $didModel->delete();
} else {
$model = $didModel;
Expand Down

0 comments on commit 607e5f6

Please sign in to comment.