Optimize queries from payout processor at startup

This commit is contained in:
nicolas.dorier
2024-09-24 23:39:05 +09:00
parent c97c9d4ece
commit f00a71922f
4 changed files with 25 additions and 14 deletions

View File

@@ -160,13 +160,6 @@ namespace BTCPayServer.Services
return res.Succeeded;
}
public async Task<bool> IsAdminUser(string userId)
{
using var scope = _serviceProvider.CreateScope();
var userManager = scope.ServiceProvider.GetRequiredService<UserManager<ApplicationUser>>();
return Roles.HasServerAdmin(await userManager.GetRolesAsync(new ApplicationUser() { Id = userId }));
}
public async Task<bool> IsAdminUser(ApplicationUser user)
{
using var scope = _serviceProvider.CreateScope();