Add GetBotByUserIdAndNameAsync method to IBotService and BotService

- Implemented GetBotByUserIdAndNameAsync in IBotService and BotService to retrieve a bot by user ID and name.
- Updated GetUserStrategyCommandHandler to utilize the new method for fetching strategies based on user ID.
- Added corresponding method in IBotRepository and PostgreSqlBotRepository for database access.
This commit is contained in:
2025-11-22 10:46:07 +07:00
parent 476bcebfe9
commit 269bbfaab0
5 changed files with 31 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ public interface IBotRepository
Task<IEnumerable<Bot>> GetBotsByUserIdAsync(int id);
Task<IEnumerable<Bot>> GetBotsByStatusAsync(BotStatus status);
Task<Bot> GetBotByNameAsync(string name);
Task<Bot> GetBotByUserIdAndNameAsync(int userId, string name);
/// <summary>
/// Gets paginated bots with filtering and sorting