Code cleanups

This commit is contained in:
Dennis Reimann
2024-04-04 10:58:47 +02:00
parent df4d370524
commit c7a8523b77
10 changed files with 56 additions and 67 deletions

View File

@@ -158,9 +158,7 @@ namespace BTCPayServer.Controllers
private string? GetUserId()
{
if (User.Identity?.AuthenticationType != AuthenticationSchemes.Cookie)
return null;
return _userManager.GetUserId(User);
return User.Identity?.AuthenticationType != AuthenticationSchemes.Cookie ? null : _userManager.GetUserId(User);
}
}
}