Fix db and fix endpoints
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Managing.Application.Abstractions;
|
||||
using Managing.Application.Abstractions.Services;
|
||||
using Managing.Application.ManageBot.Commands;
|
||||
using MediatR;
|
||||
|
||||
@@ -9,18 +9,17 @@ namespace Managing.Application.ManageBot
|
||||
/// </summary>
|
||||
public class GetOnlineAgentNamesCommandHandler : IRequestHandler<GetOnlineAgentNamesCommand, IEnumerable<string>>
|
||||
{
|
||||
private readonly IBotService _botService;
|
||||
private readonly IAgentService _agentService;
|
||||
|
||||
public GetOnlineAgentNamesCommandHandler(IBotService botService)
|
||||
public GetOnlineAgentNamesCommandHandler(IAgentService agentService)
|
||||
{
|
||||
_botService = botService;
|
||||
_agentService = agentService;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<string>> Handle(GetOnlineAgentNamesCommand request,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
var activeBots = await _botService.GetActiveBotsNamesAsync();
|
||||
return activeBots;
|
||||
return await _agentService.GetAllOnlineAgents();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user