diff --git a/src/web/Dim.Web/BusinessLogic/DimBusinessLogic.cs b/src/web/Dim.Web/BusinessLogic/DimBusinessLogic.cs index 4746e1f..e8cb076 100644 --- a/src/web/Dim.Web/BusinessLogic/DimBusinessLogic.cs +++ b/src/web/Dim.Web/BusinessLogic/DimBusinessLogic.cs @@ -216,10 +216,10 @@ public async Task RetriggerProcess(ProcessTypeId processTypeId, Guid processId, throw new NotFoundException($"process {processId} does not exist"); } - var context = processData.CreateManualProcessData(stepToTrigger, dimRepositories, () => $"processId {processId}"); - + var context = processData.CreateManualProcessData(processStepTypeId, dimRepositories, () => $"processId {processId}"); context.ScheduleProcessSteps(Enumerable.Repeat(stepToTrigger, 1)); context.FinalizeProcessStep(); + await dimRepositories.SaveAsync().ConfigureAwait(ConfigureAwaitOptions.None); } } diff --git a/src/web/Dim.Web/Controllers/DimController.cs b/src/web/Dim.Web/Controllers/DimController.cs index 642a32a..5a0a826 100644 --- a/src/web/Dim.Web/Controllers/DimController.cs +++ b/src/web/Dim.Web/Controllers/DimController.cs @@ -109,7 +109,7 @@ public static RouteGroupBuilder MapDimApi(this RouteGroupBuilder group) .RequireAuthorization(r => r.RequireRole("get_process")) .Produces(StatusCodes.Status200OK, contentType: Constants.JsonContentType); - dim.MapGet("process/wallet/{processId}/retrigger", ( + dim.MapPost("process/wallet/{processId}/retrigger", ( [FromRoute] Guid processId, [FromQuery] ProcessStepTypeId processStepTypeId, [FromServices] IDimBusinessLogic dimBusinessLogic) @@ -122,7 +122,7 @@ public static RouteGroupBuilder MapDimApi(this RouteGroupBuilder group) .RequireAuthorization(r => r.RequireRole("retrigger_process")) .Produces(StatusCodes.Status200OK, contentType: Constants.JsonContentType); - dim.MapGet("process/technicalUser/{processId}/retrigger", ( + dim.MapPost("process/technicalUser/{processId}/retrigger", ( [FromRoute] Guid processId, [FromQuery] ProcessStepTypeId processStepTypeId, [FromServices] IDimBusinessLogic dimBusinessLogic)