Refactor RecActionView command invocation, remove extension
Removed the ToInvokeCommand extension method and now construct InvokeRecActionViewCommand instances directly in the batch handler. Also added an unused using directive in InvokeBatchRecActionViewsCommand.cs.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using MediatR;
|
||||
using DigitalData.Core.Abstractions.Interfaces;
|
||||
using MediatR;
|
||||
using ReC.Application.RecActions.Queries;
|
||||
using ReC.Domain.Constants;
|
||||
|
||||
@@ -23,7 +24,7 @@ public class InvokeRecActionViewsCommandHandler(ISender sender) : IRequestHandle
|
||||
|
||||
foreach (var action in actions)
|
||||
{
|
||||
var ok = await sender.Send(action.ToInvokeCommand(), cancel);
|
||||
var ok = await sender.Send(new InvokeRecActionViewCommand() { Action = action }, cancel);
|
||||
if (!ok)
|
||||
switch (action.ErrorAction)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user