feat: Bot management improvements with wallet configuration and duplicate detection

This commit is contained in:
2025-10-10 12:34:00 +01:00
parent 91000035f5
commit 7008a95df3
9 changed files with 408 additions and 13 deletions

View File

@@ -54,6 +54,25 @@ public class BotsController : ControllerBase
return Ok(bot);
}
[HttpGet("by-platform/{platformType}/{platformUsername}")]
[AllowAnonymous]
public async Task<ActionResult<BotDto>> GetBotByPlatformUsername(int platformType, string platformUsername)
{
try
{
var bot = await _botService.GetBotByPlatformUsernameAsync(platformType, platformUsername);
if (bot == null)
return NotFound($"Bot not found for platform {platformType} with username {platformUsername}");
return Ok(bot);
}
catch (Exception ex)
{
_logger.LogError(ex, "Failed to find bot by platform username {Platform}/@{Username}", platformType, platformUsername);
return StatusCode(500, "Internal server error");
}
}
// Bot Settings
[HttpGet("settings")]
public async Task<ActionResult<Dictionary<string, object>>> GetBotSettings()