#27 more info to myUser and userTransactions

This commit is contained in:
Dominic Villemure
2024-05-18 00:04:10 -04:00
parent 5161e3a91a
commit 5cdfd9c639
6 changed files with 27 additions and 10 deletions

View File

@@ -48,8 +48,7 @@ public class UserService(UserManager<ApplicationUser> userManager, IHttpContextA
public async Task<UserModel?> GetCurrentUserAsync()
{
// todo: Get the id of the user doing the request.
var currentUserId = contextAccessor.HttpContext?.User?.FindFirst(ClaimTypes.NameIdentifier)?.Value;
var currentUserId = contextAccessor.HttpContext?.User.FindFirst(ClaimTypes.NameIdentifier)?.Value;
if (string.IsNullOrEmpty(currentUserId))
{
return null;