Fix db and fix endpoints
This commit is contained in:
@@ -229,4 +229,14 @@ public class AgentSummaryRepository : IAgentSummaryRepository
|
||||
User = PostgreSqlMappers.Map(entity.User)
|
||||
};
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<AgentSummary>> GetAllAgentWithRunningBots()
|
||||
{
|
||||
var agentSummaries = await _context.AgentSummaries
|
||||
.Include(a => a.User)
|
||||
.Where(a => _context.Bots.Any(b => b.UserId == a.UserId && b.Status == BotStatus.Up))
|
||||
.ToListAsync();
|
||||
|
||||
return agentSummaries.Select(MapToDomain);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user