Update vitejs + fix bot saving

This commit is contained in:
2025-05-11 20:23:06 +07:00
parent 65c4ec4957
commit 84e09b32a2
20 changed files with 220 additions and 238 deletions

View File

@@ -125,7 +125,7 @@ public class BacktestController : BaseController
DateTime endDate,
MoneyManagement? moneyManagement = null,
bool save = false,
decimal cooldownPeriod = 1,
int cooldownPeriod = 1,
int maxLossStreak = 0)
{
if (string.IsNullOrEmpty(accountName))

View File

@@ -1,9 +1,9 @@
using Managing.Application.Abstractions;
using Managing.Application.Abstractions.Services;
using Managing.Application.Bots;
using Managing.Application.Hubs;
using Managing.Application.ManageBot.Commands;
using Managing.Common;
using Managing.Domain.Bots;
using Managing.Domain.Trades;
using MediatR;
using Microsoft.AspNetCore.Authorization;
@@ -142,10 +142,13 @@ public class BotController : BaseController
BotTradingBalance = request.InitialTradingBalance,
BotType = request.BotType,
CooldownPeriod = request.CooldownPeriod,
MaxLossStreak = request.MaxLossStreak
MaxLossStreak = request.MaxLossStreak,
IsForBacktest = false,
FlipPosition = request.BotType == BotType.FlippingBot,
Name = request.Name
};
var result = await _mediator.Send(new StartBotCommand(config, request.Identifier, user));
var result = await _mediator.Send(new StartBotCommand(config, request.Name, user));
await NotifyBotSubscriberAsync();
return Ok(result);
@@ -627,4 +630,5 @@ public class StartBotRequest
public int CooldownPeriod { get; set; }
public int MaxLossStreak { get; set; }
public string Name { get; set; }
}