Fix db and fix endpoints

This commit is contained in:
2025-08-05 22:30:18 +07:00
parent 2dcbcc3ef2
commit 36529ae403
36 changed files with 5073 additions and 245 deletions

View File

@@ -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();
}
}
}