Refactor to use ExecuteInsertProcedure for result insert

Replaced sender.Send and ToObjectProcedure with sender.ExecuteInsertProcedure, passing the InsertResultProcedure object, AddedWho config, and cancellation token directly. This simplifies and clarifies the result insertion process.
This commit is contained in:
2026-01-14 15:00:22 +01:00
parent 5c06f287ab
commit df2ebe0cc2

View File

@@ -134,13 +134,13 @@ public class InvokeRecActionViewCommandHandler(
var statusCode = (short)response.StatusCode;
await sender.Send(new InsertResultProcedure()
await sender.ExecuteInsertProcedure(new InsertResultProcedure()
{
StatusId = statusCode,
ActionId = action.Id,
Header = JsonSerializer.Serialize(resHeaders, options: new() { WriteIndented = false }),
Body = resBody
}.ToObjectProcedure(config?["AddedWho"]), cancel);
}, config?["AddedWho"], cancel);
return response.IsSuccessStatusCode;
}