merged
This commit is contained in:
@@ -12,7 +12,7 @@ public interface IIdentityService
|
||||
Task<Result> UpdateCurrentUserBannerPictureUrlAsync(string url);
|
||||
Task<Result> UpdateCurrentUserProfilePictureUrlAsync(string url);
|
||||
Task<Result> UpdateCurrentUserWebsiteIconUrlAsync(string url);
|
||||
Task<Result<string>> UpdateCurrentUserAsync(UserModel userModel, string? portraitUrl);
|
||||
Task<Result<string>> UpdateCurrentUserAsync(UserModel userModel);
|
||||
Task<IList<string>> GetCurrentUserRolesAsync();
|
||||
Task<UserModel?> FindUserByIdAsync(string id);
|
||||
Task<UserModel?> FindUserByEmailAsync(string email);
|
||||
|
||||
@@ -44,7 +44,7 @@ public class UpdateCurrentUserCommandHandler(IApplicationDbContext context, IIde
|
||||
var userModel = mapper.Map<UserModel>(request);
|
||||
userModel.Id = identityUser.Id;
|
||||
|
||||
var result = await identityService.UpdateCurrentUserAsync(userModel, request.PortraitUrl);
|
||||
var result = await identityService.UpdateCurrentUserAsync(userModel);
|
||||
|
||||
await context.SaveChangesAsync(cancellationToken);
|
||||
|
||||
|
||||
@@ -28,15 +28,17 @@ public class GetMinimalUserQueryHandler(
|
||||
{
|
||||
identityUser = await identityService.GetUserByUserNameAsync(request.UserName);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var user = new MinimalUserDto
|
||||
{
|
||||
FirstName = identityUser?.FirstName ?? string.Empty,
|
||||
LastName = identityUser?.LastName ?? string.Empty,
|
||||
UserName = identityUser?.UserName ?? string.Empty
|
||||
UserName = identityUser?.UserName ?? string.Empty,
|
||||
SocialNetworks = identityUser?.SocialNetworks ?? new(),
|
||||
ProfileColors = identityUser?.ProfileColors ?? new(),
|
||||
StoredDataUrls = identityUser?.StoredDataUrls ?? new(),
|
||||
};
|
||||
|
||||
return user;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using Hutopy.Application.Users.Models;
|
||||
|
||||
namespace Hutopy.Application.Users.Queries.GetMinimalUser;
|
||||
|
||||
public class MinimalUserDto
|
||||
@@ -5,4 +7,8 @@ public class MinimalUserDto
|
||||
public required string FirstName { get; init; }
|
||||
public required string LastName { get; init; }
|
||||
public required string UserName { get; init; } = String.Empty;
|
||||
|
||||
public SocialNetworksModel SocialNetworks { get; init; } = new();
|
||||
public ProfileColorsModel ProfileColors { get; init; } = new();
|
||||
public StoredDataUrlsModel StoredDataUrls { get; init; } = new();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user