From da4b81e4ef4996dbd096caf448a4590a604577f7 Mon Sep 17 00:00:00 2001 From: Artiom Fotescu Date: Mon, 29 Aug 2022 20:59:00 +0300 Subject: [PATCH] Removed redundant ternary (#719) --- src/Web/Controllers/UserController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Web/Controllers/UserController.cs b/src/Web/Controllers/UserController.cs index 4945ee2..6ce1818 100644 --- a/src/Web/Controllers/UserController.cs +++ b/src/Web/Controllers/UserController.cs @@ -24,7 +24,7 @@ public class UserController : ControllerBase [Authorize] [AllowAnonymous] public async Task GetCurrentUser() => - Ok(User.Identity.IsAuthenticated ? await CreateUserInfo(User) : UserInfo.Anonymous); + Ok(await CreateUserInfo(User)); private async Task CreateUserInfo(ClaimsPrincipal claimsPrincipal) {