Changed order of fields to match the pusher docs

This commit is contained in:
Alex Renoki 2020-09-18 11:57:39 +03:00
parent 30c6635a91
commit bab2ef203c
4 changed files with 5 additions and 5 deletions

View File

@ -32,8 +32,8 @@ class TriggerEvent extends Controller
); );
$payload = [ $payload = [
'channel' => $channelName,
'event' => $request->name, 'event' => $request->name,
'channel' => $channelName,
'data' => $request->data, 'data' => $request->data,
]; ];
@ -52,8 +52,8 @@ class TriggerEvent extends Controller
StatisticsCollector::apiMessage($request->appId); StatisticsCollector::apiMessage($request->appId);
DashboardLogger::log($request->appId, DashboardLogger::TYPE_API_MESSAGE, [ DashboardLogger::log($request->appId, DashboardLogger::TYPE_API_MESSAGE, [
'channel' => $channelName,
'event' => $request->name, 'event' => $request->name,
'channel' => $channelName,
'payload' => $request->data, 'payload' => $request->data,
]); ]);
} }

View File

@ -23,8 +23,8 @@ class SendMessage
'appId' => ['required', new AppId], 'appId' => ['required', new AppId],
'key' => 'required|string', 'key' => 'required|string',
'secret' => 'required|string', 'secret' => 'required|string',
'channel' => 'required|string',
'event' => 'required|string', 'event' => 'required|string',
'channel' => 'required|string',
'data' => 'required|json', 'data' => 'required|json',
]); ]);

View File

@ -67,8 +67,8 @@ class DashboardLogger
$channelName = static::LOG_CHANNEL_PREFIX.$type; $channelName = static::LOG_CHANNEL_PREFIX.$type;
$payload = [ $payload = [
'channel' => $channelName,
'event' => 'log-message', 'event' => 'log-message',
'channel' => $channelName,
'data' => [ 'data' => [
'type' => $type, 'type' => $type,
'time' => strftime('%H:%M:%S'), 'time' => strftime('%H:%M:%S'),

View File

@ -71,8 +71,8 @@ class PusherClientMessage implements PusherMessage
DashboardLogger::log($this->connection->app->id, DashboardLogger::TYPE_WS_MESSAGE, [ DashboardLogger::log($this->connection->app->id, DashboardLogger::TYPE_WS_MESSAGE, [
'socketId' => $this->connection->socketId, 'socketId' => $this->connection->socketId,
'channel' => $this->payload->channel,
'event' => $this->payload->event, 'event' => $this->payload->event,
'channel' => $this->payload->channel,
'data' => $this->payload, 'data' => $this->payload,
]); ]);
} }