nitpicks
This commit is contained in:
parent
3a0ba1d594
commit
ffe6cc19b4
|
|
@ -125,9 +125,9 @@
|
||||||
|
|
||||||
this.subscribeToChannel('subscribed');
|
this.subscribeToChannel('subscribed');
|
||||||
|
|
||||||
this.subscribeToChannel('client_message');
|
this.subscribeToChannel('client-message');
|
||||||
|
|
||||||
this.subscribeToChannel('api_message');
|
this.subscribeToChannel('api-message');
|
||||||
},
|
},
|
||||||
|
|
||||||
disconnect() {
|
disconnect() {
|
||||||
|
|
@ -136,7 +136,7 @@
|
||||||
|
|
||||||
subscribeToChannel(channel) {
|
subscribeToChannel(channel) {
|
||||||
this.pusher.subscribe('{{ \BeyondCode\LaravelWebSockets\LaravelEcho\Pusher\Dashboard::LOG_CHANNEL_PREFIX }}'+channel)
|
this.pusher.subscribe('{{ \BeyondCode\LaravelWebSockets\LaravelEcho\Pusher\Dashboard::LOG_CHANNEL_PREFIX }}'+channel)
|
||||||
.bind('log_message', (data) => {
|
.bind('log-message', (data) => {
|
||||||
this.logs.push(data);
|
this.logs.push(data);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ class Dashboard
|
||||||
const TYPE_VACATED = 'vacated';
|
const TYPE_VACATED = 'vacated';
|
||||||
const TYPE_OCCUPIED = 'occupied';
|
const TYPE_OCCUPIED = 'occupied';
|
||||||
const TYPE_SUBSCRIBED = 'subscribed';
|
const TYPE_SUBSCRIBED = 'subscribed';
|
||||||
const TYPE_CLIENT_MESSAGE = 'client_message';
|
const TYPE_CLIENT_MESSAGE = 'client-message';
|
||||||
const TYPE_API_MESSAGE = 'api_message';
|
const TYPE_API_MESSAGE = 'api-message';
|
||||||
|
|
||||||
public static function connection(ConnectionInterface $connection)
|
public static function connection(ConnectionInterface $connection)
|
||||||
{
|
{
|
||||||
|
|
@ -81,7 +81,7 @@ class Dashboard
|
||||||
$channel = app(ChannelManager::class)->find($appId, $channelId);
|
$channel = app(ChannelManager::class)->find($appId, $channelId);
|
||||||
|
|
||||||
optional($channel)->broadcast([
|
optional($channel)->broadcast([
|
||||||
'event' => 'log_message',
|
'event' => 'log-message',
|
||||||
'channel' => $channelId,
|
'channel' => $channelId,
|
||||||
'data' => [
|
'data' => [
|
||||||
'type' => $type,
|
'type' => $type,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue