using Managing.Application.Abstractions;
using Managing.Application.ManageBot.Commands;
using MediatR;

namespace Managing.Application.ManageBot
{
    public class GetActiveBotsCommandHandler(IBotService botService)
        : IRequestHandler<GetActiveBotsCommand, List<ITradingBot>>
    {
        public Task<List<ITradingBot>> Handle(GetActiveBotsCommand request, CancellationToken cancellationToken)
        {
            return Task.FromResult(botService.GetActiveBots());
        }
    }
}