User profile service #2
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
.FirstAsync(x => x.ApplicationUserId.ToString() == appUserId && !x.IsDeleted)
|
||||||
?? throw new NotFoundException();
|
?? throw new NotFoundException();
|
||||||
|
|
||||||
return profile;
|
return profile;
|
||||||
|
|
Loading…
Reference in a new issue