This commit is contained in:
Alex Solomaha
2017-01-20 21:00:28 +02:00
parent 3499ae75af
commit 1d8d5d9896
5 changed files with 102 additions and 25 deletions

View File

@@ -3,7 +3,7 @@
namespace app\modules\api\controllers;
use app\models\Trigger;
use app\modules\api\components\WebSocketAPI;
use app\modules\api\components\WebSocketAPIBridge;
use Yii;
use yii\base\InvalidParamException;
use yii\base\NotSupportedException;
@@ -43,7 +43,7 @@ class TriggerController extends Controller
throw new InvalidParamException('This Trigger cannot be triggered by API call');
}
$api = new WebSocketAPI(Yii::$app->user->identity);
$api = new WebSocketAPIBridge(Yii::$app->user->identity);
return [
'success' => $api->trig($trigger_id),