diff options
| author | Joshua May <git@hotdog.horse> | 2024-02-11 03:52:21 +0100 |
|---|---|---|
| committer | Joshua May <git@hotdog.horse> | 2024-02-11 03:52:21 +0100 |
| commit | bef051ce625c15520b615c50fb3b6638dd160b06 (patch) | |
| tree | af2535fb01ad521c1e54ab7cfde8199069a72929 /src/web | |
| parent | e0656e1fccf73d5111c1b170d21f7610d44b58f6 (diff) | |
| download | slskd-bef051ce625c15520b615c50fb3b6638dd160b06.tar.gz | |
Fix broken imports
Diffstat (limited to 'src/web')
| -rw-r--r-- | src/web/src/components/App.jsx | 3 | ||||
| -rw-r--r-- | src/web/src/lib/hubFactory.js | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/web/src/components/App.jsx b/src/web/src/components/App.jsx index 83997b20..bbd7bd91 100644 --- a/src/web/src/components/App.jsx +++ b/src/web/src/components/App.jsx @@ -5,6 +5,7 @@ import { createApplicationHubConnection } from '../lib/hubFactory'; import * as relayAPI from '../lib/relay'; import { connect, disconnect } from '../lib/server'; import * as session from '../lib/session'; +import { isPassthroughEnabled } from '../lib/token'; import AppContext from './AppContext'; import Browse from './Browse/Browse'; import Chat from './Chat/Chat'; @@ -282,7 +283,7 @@ class App extends Component { ); } - if (!session.isLoggedIn() && !session.isPassthroughEnabled()) { + if (!session.isLoggedIn() && !isPassthroughEnabled()) { return ( <LoginForm error={login.error} diff --git a/src/web/src/lib/hubFactory.js b/src/web/src/lib/hubFactory.js index b764ed4a..d5264e03 100644 --- a/src/web/src/lib/hubFactory.js +++ b/src/web/src/lib/hubFactory.js @@ -1,5 +1,5 @@ import { hubBaseUrl } from '../config'; -import * as session from './session'; +import { getToken, isPassthroughEnabled } from './token'; import { HubConnectionBuilder, JsonHubProtocol, @@ -9,9 +9,7 @@ import { export const createHubConnection = ({ url }) => new HubConnectionBuilder() .withUrl(url, { - accessTokenFactory: session.isPassthroughEnabled() - ? undefined - : session.getToken, + accessTokenFactory: isPassthroughEnabled() ? undefined : getToken, withCredentials: true, }) .withAutomaticReconnect([ |
