Removed redundant ternary (#719)
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user