diff --git a/src/ReC.API/Controllers/RecActionController.cs b/src/ReC.API/Controllers/RecActionController.cs
index 543186d..ff0d2b2 100644
--- a/src/ReC.API/Controllers/RecActionController.cs
+++ b/src/ReC.API/Controllers/RecActionController.cs
@@ -18,7 +18,7 @@ public class RecActionController(IMediator mediator, IConfiguration config) : Co
/// The ID of the profile.
/// A token to cancel the operation.
/// An HTTP 202 Accepted response indicating the process has been started.
- [HttpPost("invoke/{profileId}")]
+ [HttpPost("invoke/{cmd}")]
[ProducesResponseType(StatusCodes.Status202Accepted)]
public async Task Invoke([FromRoute] int profileId, CancellationToken cancel)
{
@@ -120,18 +120,14 @@ public class RecActionController(IMediator mediator, IConfiguration config) : Co
///
/// Deletes all RecActions associated with a specific profile.
///
- /// The ID of the profile whose RecActions should be deleted.
+ ///
/// A token to cancel the operation.
/// An HTTP 204 No Content response upon successful deletion.
[HttpDelete]
[ProducesResponseType(StatusCodes.Status204NoContent)]
- public async Task Delete([FromQuery] int profileId, CancellationToken cancel)
+ public async Task Delete([FromQuery] DeleteRecActionsCommand cmd, CancellationToken cancel)
{
- await mediator.Send(new DeleteRecActionsCommand()
- {
- ProfileId = config.GetFakeProfileId()
- }, cancel);
-
+ await mediator.Send(cmd, cancel);
return NoContent();
}
diff --git a/src/ReC.Application/RecActions/Commands/DeleteRecActionsCommand.cs b/src/ReC.Application/RecActions/Commands/DeleteRecActionsCommand.cs
index abc2a64..84e52d9 100644
--- a/src/ReC.Application/RecActions/Commands/DeleteRecActionsCommand.cs
+++ b/src/ReC.Application/RecActions/Commands/DeleteRecActionsCommand.cs
@@ -8,7 +8,7 @@ namespace ReC.Application.RecActions.Commands;
public class DeleteRecActionsCommand : IRequest
{
- public long ProfileId { get; init; } = 2;
+ public required long ProfileId { get; init; }
}
public class DeleteRecActionsCommandHandler(IRepository repo) : IRequestHandler