Removed redundant ternary (#719)

This commit is contained in:
Artiom Fotescu
2022-08-29 20:59:00 +03:00
committed by GitHub
parent a787c8bb52
commit da4b81e4ef

View File

@@ -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)
{