Аватар
This commit is contained in:
@@ -29,7 +29,8 @@ internal sealed class GetMeQueryHandler : IQueryHandler<GetMeQuery, AuthResponse
|
||||
RefreshToken = string.Empty,
|
||||
UserId = user.Id,
|
||||
Username = user.Username,
|
||||
DisplayName = user.DisplayName
|
||||
DisplayName = user.DisplayName,
|
||||
Avatar = user.Avatar
|
||||
};
|
||||
|
||||
return Result.Success(response);
|
||||
|
||||
@@ -72,6 +72,9 @@ public sealed class User : AggregateRoot<Guid>
|
||||
Username = contract.Username;
|
||||
DisplayName = contract.DisplayName;
|
||||
PhoneNumber = contract.PhoneNumber;
|
||||
Bio = contract.Bio;
|
||||
Avatar = contract.Avatar;
|
||||
Birthday = contract.Birthday;
|
||||
IsBanned = contract.IsBanned;
|
||||
BannedUntil = contract.BannedUntil;
|
||||
SetOnline(contract.IsOnline, contract.LastSeen);
|
||||
|
||||
@@ -65,6 +65,7 @@ internal sealed class UserRepository : IUserRepository
|
||||
{
|
||||
domainUser.UpdateFromContract(user);
|
||||
_context.Users.Update(domainUser);
|
||||
await _context.SaveChangesAsync(cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user