Delete backtest by id and with filters

This commit is contained in:
2025-07-11 22:05:46 +07:00
parent 9714da1eb9
commit 79f0cd20c1
9 changed files with 239 additions and 69 deletions

View File

@@ -103,6 +103,18 @@ public class BacktestController : BaseController
return Ok(_backtester.DeleteBacktestByUser(user, id));
}
/// <summary>
/// Deletes multiple backtests by their IDs for the authenticated user.
/// </summary>
/// <param name="request">The request containing the array of backtest IDs to delete.</param>
/// <returns>An ActionResult indicating the outcome of the operation.</returns>
[HttpDelete("multiple")]
public async Task<ActionResult> DeleteBacktests([FromBody] DeleteBacktestsRequest request)
{
var user = await GetUser();
return Ok(_backtester.DeleteBacktestsByIdsForUser(user, request.BacktestIds));
}
/// <summary>
/// Retrieves all backtests for a specific genetic request ID.
/// This endpoint is used to view the results of a genetic algorithm optimization.