Fix get online agentnames

This commit is contained in:
2025-08-05 05:09:50 +07:00
parent eaf18189e4
commit 6c63b80f4a

View File

@@ -7,7 +7,7 @@ namespace Managing.Application.ManageBot
/// <summary>
/// Handler for retrieving only online agent names
/// </summary>
public class GetOnlineAgentNamesCommandHandler : IRequestHandler<GetOnlineAgentNamesCommand, IEnumerable<string>>
public class GetOnlineAgentNamesCommandHandler : IRequestHandler<GetOnlineAgentNamesCommand, List<string>>
{
private readonly IBotService _botService;
@@ -16,10 +16,11 @@ namespace Managing.Application.ManageBot
_botService = botService;
}
public async Task<IEnumerable<string>> Handle(GetOnlineAgentNamesCommand request,
public async Task<List<string>> Handle(GetOnlineAgentNamesCommand request,
CancellationToken cancellationToken)
{
return await _botService.GetActiveBotsNamesAsync();
var activeBots = await _botService.GetActiveBotsNamesAsync();
return activeBots.ToList();
}
}
}