diff --git a/src/ReC.API/Controllers/RecActionController.cs b/src/ReC.API/Controllers/RecActionController.cs index 0ba1ed8..4783001 100644 --- a/src/ReC.API/Controllers/RecActionController.cs +++ b/src/ReC.API/Controllers/RecActionController.cs @@ -20,6 +20,13 @@ public class RecActionController(IMediator mediator) : ControllerBase return Accepted(); } + [HttpPost("invoke/fake")] + public async Task Invoke(CancellationToken cancel) + { + await mediator.InvokeBatchRecAction(FakeProfileId, cancel); + return Accepted(); + } + #region CRUD [HttpGet] public async Task Get([FromQuery] long profileId, CancellationToken cancel) => Ok(await mediator.Send(new ReadRecActionQuery() diff --git a/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionsCommand.cs b/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionsCommand.cs index fd12530..bfe57ff 100644 --- a/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionsCommand.cs +++ b/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionsCommand.cs @@ -8,7 +8,7 @@ public record InvokeBatchRecActionsCommand : ReadRecActionQueryBase, IRequest; public static class InvokeBatchRecActionsCommandExtensions { - public static Task InvokeBatchRecAction(this ISender sender, int profileId, CancellationToken cancel = default) + public static Task InvokeBatchRecAction(this ISender sender, long profileId, CancellationToken cancel = default) => sender.Send(new InvokeBatchRecActionsCommand { ProfileId = profileId }, cancel); }