fix JwtBearerEvents

This commit is contained in:
ngfrolov 2023-09-18 17:10:30 +05:00
parent 536cc55c97
commit 750e63300c
Signed by untrusted user who does not match committer: ng.frolov
GPG Key ID: E99907A0357B29A7

View File

@ -121,8 +121,7 @@ namespace AsbCloudWebApi
return Task.CompletedTask; return Task.CompletedTask;
} }
context.HttpContext.RequestServices.GetRequiredService<IUserRepository>(); var userService = context.HttpContext.RequestServices.GetRequiredService<IUserRepository>();
var userService = services.BuildServiceProvider().GetRequiredService<IUserRepository>();
var user = userService.GetOrDefault(idUser.Value); var user = userService.GetOrDefault(idUser.Value);
if (user is null) if (user is null)