using LiteCqrs;
using TeleWave.Application.Common.Interfaces;
using TeleWave.Application.Common.Models;

namespace TeleWave.Application.Admin.Roles.DeleteRole;

public sealed class DeleteRoleCommandHandler(IRoleService roleService)
    : ICommandHandler<DeleteRoleCommand, Result>
{
    public Task<Result> Handle(DeleteRoleCommand command, CancellationToken cancellationToken) =>
        roleService.DeleteRoleAsync(command.Id, cancellationToken);
}
