diff --git a/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowInstances/Journal/GetLastEntry/Endpoint.cs b/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowInstances/Journal/GetLastEntry/Endpoint.cs index 2a3988c5d..a3f0a637f 100644 --- a/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowInstances/Journal/GetLastEntry/Endpoint.cs +++ b/src/modules/Elsa.Workflows.Api/Endpoints/WorkflowInstances/Journal/GetLastEntry/Endpoint.cs @@ -12,16 +12,8 @@ namespace Elsa.Workflows.Api.Endpoints.WorkflowInstances.Journal.GetLastEntry; /// Return the last log entry for the specified workflow instance and activity ID. /// [PublicAPI] -public class Get : ElsaEndpoint +public class Get(IWorkflowExecutionLogStore store) : ElsaEndpoint { - private readonly IWorkflowExecutionLogStore _store; - - /// - public Get(IWorkflowExecutionLogStore store) - { - _store = store; - } - /// public override void Configure() { @@ -36,7 +28,7 @@ public class Get : ElsaEndpoint { WorkflowInstanceId = request.WorkflowInstanceId, ActivityId = request.ActivityId, - EventNames = new[] { "Started", "Completed", "Faulted" } + EventNames = ["Started", "Completed", "Faulted"] }; var sort = new WorkflowExecutionLogRecordOrder( @@ -44,7 +36,7 @@ public class Get : ElsaEndpoint OrderDirection.Descending ); - var entry = await _store.FindAsync(filter, sort, cancellationToken); + var entry = await store.FindAsync(filter, sort, cancellationToken); if (entry == null) {