mirror of
https://github.com/Sonarr/Sonarr
synced 2025-03-04 10:39:34 +00:00
Fix signalR
This commit is contained in:
parent
7b133bd80d
commit
15b070119d
1 changed files with 7 additions and 3 deletions
|
@ -1,4 +1,8 @@
|
|||
import signalR, { HubConnection } from '@microsoft/signalr';
|
||||
import {
|
||||
HubConnection,
|
||||
HubConnectionBuilder,
|
||||
LogLevel,
|
||||
} from '@microsoft/signalr';
|
||||
import { useEffect, useRef } from 'react';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import ModelBase from 'App/ModelBase';
|
||||
|
@ -321,8 +325,8 @@ function SignalRListener() {
|
|||
|
||||
const url = `${window.Sonarr.urlBase}/signalr/messages`;
|
||||
|
||||
connection.current = new signalR.HubConnectionBuilder()
|
||||
.configureLogging(new SignalRLogger(signalR.LogLevel.Information))
|
||||
connection.current = new HubConnectionBuilder()
|
||||
.configureLogging(new SignalRLogger(LogLevel.Information))
|
||||
.withUrl(
|
||||
`${url}?access_token=${encodeURIComponent(window.Sonarr.apiKey)}`
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue