diff --git a/src/ReC.API/Controllers/RecActionController.cs b/src/ReC.API/Controllers/RecActionController.cs index a407991..736e58e 100644 --- a/src/ReC.API/Controllers/RecActionController.cs +++ b/src/ReC.API/Controllers/RecActionController.cs @@ -19,9 +19,9 @@ public class RecActionController(IMediator mediator) : ControllerBase }, cancel)); [HttpPost("{profileId}")] - public async Task Invoke([FromRoute] int profileId) + public async Task Invoke([FromRoute] int profileId, CancellationToken cancel) { - await mediator.InvokeBatchRecAction(profileId); + await mediator.InvokeBatchRecAction(profileId, cancel); return Accepted(); } diff --git a/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionsCommand.cs b/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionsCommand.cs index dd52538..fd12530 100644 --- a/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionsCommand.cs +++ b/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionsCommand.cs @@ -8,8 +8,8 @@ public record InvokeBatchRecActionsCommand : ReadRecActionQueryBase, IRequest; public static class InvokeBatchRecActionsCommandExtensions { - public static Task InvokeBatchRecAction(this ISender sender, int profileId) - => sender.Send(new InvokeBatchRecActionsCommand { ProfileId = profileId }); + public static Task InvokeBatchRecAction(this ISender sender, int profileId, CancellationToken cancel = default) + => sender.Send(new InvokeBatchRecActionsCommand { ProfileId = profileId }, cancel); } public class InvokeRecActionsCommandHandler(ISender sender, IHttpClientFactory clientFactory, ILogger? logger = null) : IRequestHandler