Switch to InsertResultProcedure for result handling
Replaced CreateOutResCommand with InsertResultProcedure when sending results. Updated property names (StatusId instead of Status) and now use ToObjectProcedure to include AddedWho. Added InsertProcedure namespace import.
This commit is contained in:
@@ -4,6 +4,7 @@ using ReC.Application.Common;
|
||||
using ReC.Application.Common.Constants;
|
||||
using ReC.Application.Common.Dto;
|
||||
using ReC.Application.Common.Exceptions;
|
||||
using ReC.Application.Common.Procedures.InsertProcedure;
|
||||
using ReC.Application.OutResults.Commands;
|
||||
using ReC.Domain.Constants;
|
||||
using System.Net;
|
||||
@@ -133,14 +134,13 @@ public class InvokeRecActionViewCommandHandler(
|
||||
|
||||
var statusCode = (short)response.StatusCode;
|
||||
|
||||
await sender.Send(new CreateOutResCommand
|
||||
await sender.Send(new InsertResultProcedure()
|
||||
{
|
||||
Status = statusCode,
|
||||
StatusId = statusCode,
|
||||
ActionId = action.Id,
|
||||
Header = JsonSerializer.Serialize(resHeaders, options: new() { WriteIndented = false }),
|
||||
Body = resBody,
|
||||
AddedWho = config?["AddedWho"]
|
||||
}, cancel);
|
||||
Body = resBody
|
||||
}.ToObjectProcedure(config?["AddedWho"]), cancel);
|
||||
|
||||
return response.IsSuccessStatusCode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user