using Application.Abstractions.Identity;
using MediatR;

namespace Application.Features.Director.Role.Permissions.Update
{
    public sealed class Handler(IIdentityRoleWriter roleWriter) : IRequestHandler<Command>
    {
        public async Task Handle(Command request, CancellationToken ct)
        {
            await roleWriter.UpdateRoleAsync(request.RoleID, request.Permissions, ct);
        }
    }
}