Merge branch '250809_UserProfile' of git.chillplace.beer:chilldev/drinkrate into 250809_UserProfile

This commit is contained in:
Jiří Vrabec 2025-08-11 19:34:53 +02:00
commit 1b54a6d6a6

View file

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