using ODMO.Commons.DTOs.Config; using ODMO.Commons.Repositories.Admin; using MediatR; namespace ODMO.Application.Admin.Commands { public class UpdateUserCommandHandler : IRequestHandler { private readonly IAdminCommandsRepository _repository; public UpdateUserCommandHandler(IAdminCommandsRepository repository) { _repository = repository; } public async Task Handle(UpdateUserCommand request, CancellationToken cancellationToken) { var dto = new UserDTO() { Id = request.Id, Username = request.UserName, AccessLevel = request.AccessLevel }; await _repository.UpdateUserAsync(dto); return Unit.Value; } } }