Skip to content

Commit

Permalink
fix: adjust retrigger check (#124)
Browse files Browse the repository at this point in the history
Refs: #111
Reviewed-By: Evelyn Gurschler <evelyn.gurschler@bmw.de>
  • Loading branch information
Phil91 authored Nov 13, 2024
1 parent 1c89bc1 commit f33f664
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/web/Dim.Web/BusinessLogic/DimBusinessLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
4 changes: 2 additions & 2 deletions src/web/Dim.Web/Controllers/DimController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit f33f664

Please sign in to comment.