Enhance DataController and BotService with new configuration and bot name checks
- Added IConfiguration dependency to DataController for environment variable access. - Updated GetPaginatedAgentSummariesCommand to include a flag for filtering profitable agents. - Implemented HasUserBotWithNameAsync method in IBotService and BotService to check for existing bots by name. - Modified StartBotCommandHandler and StartCopyTradingCommandHandler to prevent duplicate bot names during strategy creation.
This commit is contained in:
@@ -20,13 +20,15 @@ public interface IAgentSummaryRepository
|
||||
/// <param name="sortBy">Field to sort by</param>
|
||||
/// <param name="sortOrder">Sort order (asc or desc)</param>
|
||||
/// <param name="agentNames">Optional list of agent names to filter by</param>
|
||||
/// <param name="showOnlyProfitableAgent">Whether to show only agents with ROI > 0</param>
|
||||
/// <returns>Tuple containing the paginated results and total count</returns>
|
||||
Task<(IEnumerable<AgentSummary> Results, int TotalCount)> GetPaginatedAsync(
|
||||
int page,
|
||||
int pageSize,
|
||||
SortableFields sortBy,
|
||||
string sortOrder,
|
||||
IEnumerable<string>? agentNames = null);
|
||||
IEnumerable<string>? agentNames = null,
|
||||
bool showOnlyProfitableAgent = false);
|
||||
Task<IEnumerable<AgentSummary>> GetAllAgentWithRunningBots();
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user