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:
@@ -134,13 +134,13 @@ public class InvokeRecActionViewCommandHandler(
|
|||||||
|
|
||||||
var statusCode = (short)response.StatusCode;
|
var statusCode = (short)response.StatusCode;
|
||||||
|
|
||||||
await sender.Send(new InsertResultProcedure()
|
await sender.ExecuteInsertProcedure(new InsertResultProcedure()
|
||||||
{
|
{
|
||||||
StatusId = statusCode,
|
StatusId = statusCode,
|
||||||
ActionId = action.Id,
|
ActionId = action.Id,
|
||||||
Header = JsonSerializer.Serialize(resHeaders, options: new() { WriteIndented = false }),
|
Header = JsonSerializer.Serialize(resHeaders, options: new() { WriteIndented = false }),
|
||||||
Body = resBody
|
Body = resBody
|
||||||
}.ToObjectProcedure(config?["AddedWho"]), cancel);
|
}, config?["AddedWho"], cancel);
|
||||||
|
|
||||||
return response.IsSuccessStatusCode;
|
return response.IsSuccessStatusCode;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user