From bb81031c715ee3b5c7abdc52170676806ca564d6 Mon Sep 17 00:00:00 2001 From: soyalper Date: Tue, 10 Sep 2024 01:54:27 +0300 Subject: [PATCH] Update AccountController.cs --- API/Controllers/AccountController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/API/Controllers/AccountController.cs b/API/Controllers/AccountController.cs index 7899d60..a9bd763 100644 --- a/API/Controllers/AccountController.cs +++ b/API/Controllers/AccountController.cs @@ -76,7 +76,7 @@ private AuthUserDto CreateUserObject(AppUser appUser) return new AuthUserDto { DisplayName = appUser.DisplayName, - Image = appUser.Photos.FirstOrDefault(x => x.IsMain)?.Url, + Image = appUser.Photos?.FirstOrDefault(x => x.IsMain)?.Url, Token = tokenService.CreateToken(appUser), Username = appUser.UserName };