From e5eb0f19e7b03933076315f4b3885a1033fc1ef4 Mon Sep 17 00:00:00 2001 From: TekH Date: Wed, 15 Apr 2026 13:37:40 +0200 Subject: [PATCH] Add optional references to RecAction invoke endpoint The Invoke action in RecActionController now accepts an optional InvokeReferencesDto from the request body. This enables clients to provide reference values that are passed through to all result records. The method signature, XML documentation, and command dispatch have been updated to support this enhancement. --- src/ReC.API/Controllers/RecActionController.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ReC.API/Controllers/RecActionController.cs b/src/ReC.API/Controllers/RecActionController.cs index 6fdfcc7..690e03e 100644 --- a/src/ReC.API/Controllers/RecActionController.cs +++ b/src/ReC.API/Controllers/RecActionController.cs @@ -14,13 +14,18 @@ public class RecActionController(IMediator mediator) : ControllerBase /// Invokes a batch of RecActions for a given profile. /// /// The identifier of the profile whose RecActions should be invoked. + /// Optional reference values that are passed through to all result records. /// A token to cancel the operation. /// An HTTP 202 Accepted response indicating the process has been started. [HttpPost("invoke/{profileId}")] [ProducesResponseType(StatusCodes.Status202Accepted)] - public async Task Invoke([FromRoute] long profileId, CancellationToken cancel) + public async Task Invoke([FromRoute] long profileId, [FromBody] InvokeReferencesDto? references = null, CancellationToken cancel = default) { - await mediator.Send(new InvokeBatchRecActionViewsCommand { ProfileId = profileId }, cancel); + await mediator.Send(new InvokeBatchRecActionViewsCommand + { + ProfileId = profileId, + References = references + }, cancel); return Accepted(); }