Update status to match UI

This commit is contained in:
2025-08-14 18:08:31 +07:00
parent e4049045c3
commit 6a2e4e81b1
18 changed files with 111 additions and 62 deletions

View File

@@ -297,7 +297,7 @@ public class BotController : BaseController
[HttpGet]
public async Task<List<TradingBotResponse>> GetActiveBots()
{
return await GetBotsByStatusAsync(BotStatus.Up);
return await GetBotsByStatusAsync(BotStatus.Running);
}
/// <summary>
@@ -328,7 +328,7 @@ public class BotController : BaseController
return new List<TradingBotResponse>();
}
var result = await _mediator.Send(new GetBotsByUserAndStatusCommand(user.Id, BotStatus.None));
var result = await _mediator.Send(new GetBotsByUserAndStatusCommand(user.Id, BotStatus.Saved));
return MapBotsToTradingBotResponse(result);
}
catch (Exception ex)
@@ -467,7 +467,7 @@ public class BotController : BaseController
/// </summary>
private async Task NotifyBotSubscriberAsync()
{
var botsList = await GetBotsByStatusAsync(BotStatus.Up);
var botsList = await GetBotsByStatusAsync(BotStatus.Running);
await _hubContext.Clients.All.SendAsync("BotsSubscription", botsList);
}
@@ -495,7 +495,7 @@ public class BotController : BaseController
return NotFound($"Bot with identifier {request.Identifier} not found or is not a trading bot");
}
if (bot.Status != BotStatus.Up)
if (bot.Status != BotStatus.Running)
{
return BadRequest($"Bot with identifier {request.Identifier} is not running");
}