diff --git a/src/config/secrets/secrets.development.ts b/src/config/secrets/secrets.development.ts index 175a70e..6952838 100644 --- a/src/config/secrets/secrets.development.ts +++ b/src/config/secrets/secrets.development.ts @@ -3,6 +3,6 @@ import { Secrets } from '@/config/secrets/type' const secrets: Secrets = { bugsnagAPIKey: 'disabled', APIURL: '', - actionCableURL: 'http://localhost:28080/cable' + actionCableURL: 'ws://localhost:28080/cable' } export default secrets diff --git a/src/config/secrets/secrets.test.ts b/src/config/secrets/secrets.test.ts index 996a6c7..f0f69c7 100644 --- a/src/config/secrets/secrets.test.ts +++ b/src/config/secrets/secrets.test.ts @@ -3,6 +3,6 @@ import { Secrets } from '@/config/secrets/type' const secrets: Secrets = { bugsnagAPIKey: 'disabled', APIURL: 'http://localhost:5100', - actionCableURL: 'http://localhost:28080/cable' + actionCableURL: 'ws://localhost:28080/cable' } export default secrets diff --git a/src/store/modules/logfiles.ts b/src/store/modules/logfiles.ts index afd6a01..9e4dae8 100644 --- a/src/store/modules/logfiles.ts +++ b/src/store/modules/logfiles.ts @@ -14,13 +14,11 @@ import { import { logfileFromJSON, LogfileJSON } from '@/store/coding' import { loadResponseBodyOrReturnErrors, loadResponseBodyOrThrowError } from '@/store/utils' -let logfilesSubscription: Subscription +let logfilesSubscription: Subscription function createLogfilesSubscription(consumer: Consumer, dispatch: Dispatch) { if (logfilesSubscription) logfilesSubscription.unsubscribe() - logfilesSubscription = consumer.subscriptions.create({ - channel: 'LogfilesChannel' - }, { + logfilesSubscription = consumer.subscriptions.create('LogfilesChannel', { received(logfileJSON: string) { dispatch('logfilesSubscriptionMessage', { logfileJSON: JSON.parse(logfileJSON) }) } diff --git a/src/store/modules/passes.ts b/src/store/modules/passes.ts index a03202b..ab6fcd6 100644 --- a/src/store/modules/passes.ts +++ b/src/store/modules/passes.ts @@ -31,13 +31,11 @@ import { loadResponseBodyOrThrowError } from '@/store/utils' -let passesSubscription: Subscription | null = null +let passesSubscription: Subscription function createPassesSubscription(consumer: Consumer, dispatch: Dispatch) { if (passesSubscription) passesSubscription.unsubscribe() - passesSubscription = consumer.subscriptions.create({ - channel: 'PassesChannel' - }, { + passesSubscription = consumer.subscriptions.create('PassesChannel', { received(passJSON: string) { dispatch('passesSubscriptionMessage', { passJSON: JSON.parse(passJSON) }) }