1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2025-03-04 10:39:34 +00:00

Fix signalR

This commit is contained in:
Mark McDowall 2025-01-19 17:41:09 -08:00
parent 7b133bd80d
commit 15b070119d
No known key found for this signature in database

View file

@ -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)}`
)