Browse Source

Register IAuthService correctly

Mark Monteiro 5 năm trước cách đây
mục cha
commit
3147111471
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  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>();