diff --git a/AsbCloudWebApi/DependencyInjection.cs b/AsbCloudWebApi/DependencyInjection.cs index d269ef28..998212b2 100644 --- a/AsbCloudWebApi/DependencyInjection.cs +++ b/AsbCloudWebApi/DependencyInjection.cs @@ -121,8 +121,7 @@ namespace AsbCloudWebApi return Task.CompletedTask; } - context.HttpContext.RequestServices.GetRequiredService(); - var userService = services.BuildServiceProvider().GetRequiredService(); + var userService = context.HttpContext.RequestServices.GetRequiredService(); var user = userService.GetOrDefault(idUser.Value); if (user is null)