using Application.Abstractions.Identity;
using MediatR;

namespace Application.Features.Director.User.UpdateRoles
{
    public sealed class Handler(IIdentityUserWriter userWriter) : IRequestHandler<Command>
    {
        public async Task Handle(Command request, CancellationToken ct)
        {
            await userWriter.UpdateUserRolesAsync(request.UserID, request.Roles, ct);
        }
    }
}