Renamed minimalUser to user
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
using Hutopy.Application.Common.Interfaces;
|
||||
using Hutopy.Application.Common.Models;
|
||||
|
||||
namespace Hutopy.Application.Users.Queries.GetMinimalUser;
|
||||
namespace Hutopy.Application.Users.Queries.GetUser;
|
||||
|
||||
public record GetMinimalUserQuery : IRequest<MinimalUserDto>
|
||||
public record GetUserQuery : IRequest<UserDto>
|
||||
{
|
||||
public string? UserId { get; set; } = string.Empty;
|
||||
public string? UserName { get; set; } = string.Empty;
|
||||
};
|
||||
|
||||
public class GetMinimalUserQueryHandler(
|
||||
public class GetUserQueryHandler(
|
||||
IIdentityService identityService
|
||||
)
|
||||
: IRequestHandler<GetMinimalUserQuery, MinimalUserDto>
|
||||
: IRequestHandler<GetUserQuery, UserDto>
|
||||
{
|
||||
public async Task<MinimalUserDto> Handle(GetMinimalUserQuery request, CancellationToken cancellationToken)
|
||||
public async Task<UserDto> Handle(GetUserQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
UserModel? identityUser = null;
|
||||
|
||||
@@ -29,7 +29,7 @@ public class GetMinimalUserQueryHandler(
|
||||
identityUser = await identityService.GetUserByUserNameAsync(request.UserName);
|
||||
}
|
||||
|
||||
var user = new MinimalUserDto
|
||||
var user = new UserDto
|
||||
{
|
||||
Id = identityUser?.Id ?? string.Empty,
|
||||
FirstName = identityUser?.FirstName ?? string.Empty,
|
||||
@@ -1,8 +1,8 @@
|
||||
using Hutopy.Application.Users.Models;
|
||||
|
||||
namespace Hutopy.Application.Users.Queries.GetMinimalUser;
|
||||
namespace Hutopy.Application.Users.Queries.GetUser;
|
||||
|
||||
public class MinimalUserDto
|
||||
public class UserDto
|
||||
{
|
||||
public required string Id { get; init; }
|
||||
public required string FirstName { get; init; }
|
||||
Reference in New Issue
Block a user