From eb570679ba92e306a5f25799240f6c052dc06130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Zieli=C5=84ski?= Date: Sat, 6 Dec 2025 00:03:46 +0100 Subject: [PATCH] UI Fix --- .../Extensions/ServiceCollectionExtensions.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/DiunaBI.UI.Shared/Extensions/ServiceCollectionExtensions.cs b/DiunaBI.UI.Shared/Extensions/ServiceCollectionExtensions.cs index 01f5c4b..87f58fa 100644 --- a/DiunaBI.UI.Shared/Extensions/ServiceCollectionExtensions.cs +++ b/DiunaBI.UI.Shared/Extensions/ServiceCollectionExtensions.cs @@ -39,6 +39,7 @@ public static class ServiceCollectionExtensions }); // Services + services.AddScoped(); services.AddScoped(); services.AddScoped(); services.AddScoped(); @@ -48,11 +49,9 @@ public static class ServiceCollectionExtensions services.AddScoped(); services.AddScoped(); - // SignalR Hub Service (singleton for global connection shared across all users) - services.AddSingleton(sp => + // SignalR Hub Service (scoped per user session for authenticated connections) + services.AddScoped(sp => { - // For singleton, we can't inject scoped services directly - // We'll get them from the service provider when needed var logger = sp.GetRequiredService>(); var tokenProvider = sp.GetRequiredService(); return new EntityChangeHubService(apiBaseUrl, sp, logger, tokenProvider);