Merge remote-tracking branch 'origin/feature/update-current-user' into feature/update-current-user
# Conflicts: # src/Application/Common/Interfaces/IIdentityService.cs # src/Application/Common/Models/Result.cs # src/Application/Common/Models/UserModel.cs # src/Application/Users/Commands/UpdateCurrentUserCommand.cs # src/Application/Users/Models/SocialNetworksModel.cs # src/Application/Users/Queries/GetCurrentUser/GetCurrentUser.cs # src/Application/Users/Queries/GetCurrentUser/UserDto.cs # src/Infrastructure/Identity/ApplicationUser.cs # src/Infrastructure/Identity/IdentityService.cs # src/Infrastructure/Utils/GenerateJwtToken.cs # src/Web/Controllers/GoogleController.cs # src/Web/Endpoints/UpdateMyUser.cs
This commit is contained in:
@@ -88,7 +88,7 @@ public class IdentityService(
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<Result<string>> UpdateCurrentUserAsync(UserModel userModel)
|
||||
public async Task<Result<string>> UpdateCurrentUserAsync(UserModel userModel, string? portraitUrl)
|
||||
{
|
||||
var applicationUser = await userManager.FindByIdAsync(userModel.Id);
|
||||
|
||||
@@ -104,6 +104,7 @@ public class IdentityService(
|
||||
applicationUser.Address = userModel.Address;
|
||||
applicationUser.About = userModel.About;
|
||||
applicationUser.Description = userModel.Description;
|
||||
applicationUser.PortraitUrl = portraitUrl;
|
||||
applicationUser.SocialNetworks = new SocialNetworks
|
||||
{
|
||||
FacebookUrl = userModel.SocialNetworks.FacebookUrl,
|
||||
@@ -154,6 +155,7 @@ public class IdentityService(
|
||||
Address = response.Address,
|
||||
About = response.About,
|
||||
Description = response.Description,
|
||||
PortraitUrl = response.PortraitUrl,
|
||||
SocialNetworks = new SocialNetworksModel
|
||||
{
|
||||
FacebookUrl = response.SocialNetworks.FacebookUrl,
|
||||
@@ -385,7 +387,7 @@ public class IdentityService(
|
||||
email: user.Email,
|
||||
firstname: user.FirstName,
|
||||
lastname: user.LastName,
|
||||
portraitUrl: user.ProfilePictureUrl);
|
||||
portraitUrl: user.PortraitUrl);
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user