diff --git a/src/ReC.API/Controllers/OutResController.cs b/src/ReC.API/Controllers/OutResController.cs
index a526c00..8c62564 100644
--- a/src/ReC.API/Controllers/OutResController.cs
+++ b/src/ReC.API/Controllers/OutResController.cs
@@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Mvc;
using ReC.API.Extensions;
using ReC.API.Models;
-using ReC.Application.OutResults.Commands;
+using ReC.Application.Common.Procedures.DeleteProcedure;
using ReC.Application.OutResults.Queries;
namespace ReC.API.Controllers;
@@ -59,32 +59,36 @@ public class OutResController(IMediator mediator, IConfiguration config) : Contr
}
///
- /// Deletes output results based on the provided criteria.
+ /// Deletes RESULT records via the delete procedure for the specified id range.
///
- /// The command containing the deletion criteria, such as ActionId or ProfileId.
+ /// DeleteResultProcedure payload (Start, End, Force).
/// A token to cancel the operation.
- /// An empty response indicating success.
+ /// No content on success.
[HttpDelete]
[ProducesResponseType(StatusCodes.Status204NoContent)]
- [Obsolete("Use the related procedure or view.")]
- public async Task Delete([FromQuery] DeleteOutResCommand command, CancellationToken cancel)
+ public async Task Delete([FromBody] DeleteResultProcedure procedure, CancellationToken cancel)
{
- await mediator.Send(command, cancel);
+ await mediator.ExecuteDeleteProcedure(procedure, cancel);
return NoContent();
}
///
- /// Deletes all output results for a fake/test profile.
+ /// Deletes RESULT records for a fake/test profile via the delete procedure.
///
/// A token to cancel the operation.
- /// An empty response indicating success.
+ /// No content on success.
[HttpDelete("fake")]
[ProducesResponseType(StatusCodes.Status204NoContent)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
- [Obsolete("Use the related procedure or view.")]
public async Task Delete(CancellationToken cancel)
{
- await mediator.Send(new DeleteOutResCommand() { ProfileId = config.GetFakeProfileId() }, cancel);
+ await mediator.ExecuteDeleteProcedure(new DeleteResultProcedure
+ {
+ Start = config.GetFakeProfileId(),
+ End = config.GetFakeProfileId(),
+ Force = false
+ }, cancel);
+
return NoContent();
}
}
\ No newline at end of file