User profile service #2

Merged
Jiri merged 16 commits from 250809_UserProfile into main 2025-08-11 20:10:50 +00:00
Showing only changes of commit 1dc37d3282 - Show all commits

View file

@ -13,7 +13,7 @@ public class ApplicationUserService(ApplicationDbContext context)
{ {
var appUserId = identity.FindFirst(ClaimTypes.NameIdentifier)?.Value; var appUserId = identity.FindFirst(ClaimTypes.NameIdentifier)?.Value;
var profile = await _context.UserProfiles var profile = await _context.UserProfiles
.FirstAsync(x => x.ApplicationUserId.ToString() == appUserId) .FirstOrDefaultAsync(x => x.ApplicationUserId.ToString() == appUserId)
?? throw new NotFoundException(); ?? throw new NotFoundException();
return profile; return profile;