Преглед изворни кода

Register IAuthService correctly

Mark Monteiro пре 5 година
родитељ
комит
3147111471
1 измењених фајлова са 1 додато и 2 уклоњено
  1. 1 2
      Emby.Server.Implementations/ApplicationHost.cs

+ 1 - 2
Emby.Server.Implementations/ApplicationHost.cs

@@ -842,8 +842,7 @@ namespace Emby.Server.Implementations
             serviceCollection.AddSingleton<IAuthorizationContext>(authContext);
             serviceCollection.AddSingleton<ISessionContext>(new SessionContext(UserManager, authContext, SessionManager));
 
-            AuthService = new AuthService(LoggerFactory.CreateLogger<AuthService>(), authContext, ServerConfigurationManager, SessionManager, NetworkManager);
-            serviceCollection.AddSingleton(AuthService);
+            serviceCollection.AddSingleton<IAuthService, AuthService>();
 
             serviceCollection.AddSingleton<ISubtitleEncoder, MediaBrowser.MediaEncoding.Subtitles.SubtitleEncoder>();