Add References support to batch rec action commands

Added an optional References property to InvokeBatchRecActionViewsCommand. Updated the handler to pass this property to each individual InvokeRecActionViewCommand. Also included the ReC.Domain.Constants namespace for required types.
This commit is contained in:
2026-04-15 13:31:54 +02:00
parent aae42949b6
commit 46eef255ca

View File

@@ -9,6 +9,7 @@ namespace ReC.Application.RecActions.Commands;
public record InvokeBatchRecActionViewsCommand : IRequest
{
public long ProfileId { get; init; }
public InvokeReferencesDto? References { get; init; }
}
public class InvokeRecActionViewsCommandHandler(ISender sender, ILogger<InvokeRecActionViewsCommandHandler>? logger = null) : IRequestHandler<InvokeBatchRecActionViewsCommand>
@@ -21,7 +22,11 @@ public class InvokeRecActionViewsCommandHandler(ISender sender, ILogger<InvokeRe
{
try
{
await sender.Send(new InvokeRecActionViewCommand() { Action = action }, cancel);
await sender.Send(new InvokeRecActionViewCommand()
{
Action = action,
References = request.References
}, cancel);
}
catch (RecActionException ex)
{