Update status to match UI
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user