Browse Source

Removed redundant ternary (#719)

main
Artiom Fotescu 3 years ago
committed by GitHub
parent
commit
da4b81e4ef
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Web/Controllers/UserController.cs

2
src/Web/Controllers/UserController.cs

@ -24,7 +24,7 @@ public class UserController : ControllerBase
[Authorize]
[AllowAnonymous]
public async Task<IActionResult> GetCurrentUser() =>
Ok(User.Identity.IsAuthenticated ? await CreateUserInfo(User) : UserInfo.Anonymous);
Ok(await CreateUserInfo(User));
private async Task<UserInfo> CreateUserInfo(ClaimsPrincipal claimsPrincipal)
{

Loading…
Cancel
Save