Прокрутка дерганая

This commit is contained in:
Халимов Рустам
2026-04-03 16:57:06 +03:00
parent 1b8abbc995
commit 2ab5b295e8
12 changed files with 688 additions and 98 deletions
@@ -10,6 +10,7 @@ public class UserProfileDto
public string? Avatar { get; set; }
public bool IsBot { get; set; }
public DateTime? LastSeen { get; set; }
public DateTime? Birthday { get; set; }
public bool IsPremium { get; set; }
public DateTime CreatedAt { get; set; }
}
@@ -30,6 +30,7 @@ internal sealed class UpdateProfileCommandHandler : ICommandHandler<UpdateProfil
profile.DisplayName = request.DisplayName ?? profile.DisplayName;
profile.About = request.Bio;
profile.Birthday = request.Birthday;
var result = await _repository.UpdateAsync(profile, cancellationToken);
if (result.IsFailure)
@@ -83,7 +83,7 @@ internal class ProfileRepository : IProfileRepository
profile.UpdateProfile(
dto.DisplayName ?? profile.DisplayName,
dto.About ?? profile.Bio,
null);
dto.Birthday);
await _profiles.ReplaceOneAsync(p => p.Id == dto.UserId, profile, new ReplaceOptions { IsUpsert = true }, ct);
return Result.Success(profile.ToDto());
@@ -16,6 +16,7 @@ public static class ProfileMappings
Avatar = document.AvatarUrl,
IsBot = false,
LastSeen = null,
Birthday = document.Birthday,
IsPremium = false,
CreatedAt = document.CreatedAt
};