diff --git a/Directory.Packages.props b/Directory.Packages.props index 20652091a..a90908726 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -47,9 +47,9 @@ - - - + + + diff --git a/src/common/Elsa.Api.Common/Abstractions/Endpoints.cs b/src/common/Elsa.Api.Common/Abstractions/Endpoints.cs index 82b6049f9..dd075a919 100644 --- a/src/common/Elsa.Api.Common/Abstractions/Endpoints.cs +++ b/src/common/Elsa.Api.Common/Abstractions/Endpoints.cs @@ -38,7 +38,7 @@ public abstract class ElsaEndpointWithoutRequest : EndpointWithoutReq } } -public class ElsaEndpoint : Endpoint where TRequest : notnull, new() where TResponse : notnull +public class ElsaEndpoint : Endpoint where TRequest : notnull where TResponse : notnull { protected void ConfigurePermissions(params string[] permissions) { @@ -49,7 +49,7 @@ public class ElsaEndpoint : Endpoint w } } -public class ElsaEndpoint : Endpoint where TRequest : notnull, new() where TResponse : notnull where TMapper : class, IMapper, new() +public class ElsaEndpoint : Endpoint where TRequest : notnull where TResponse : notnull where TMapper : class, IMapper, new() { protected void ConfigurePermissions(params string[] permissions) { @@ -60,7 +60,7 @@ public class ElsaEndpoint : Endpoint : Endpoint where TRequest : notnull, new() +public class ElsaEndpoint : Endpoint where TRequest : notnull { protected void ConfigurePermissions(params string[] permissions) { diff --git a/src/modules/Elsa.Workflows.Api/Endpoints/RuntimeAdmin/Models.cs b/src/modules/Elsa.Workflows.Api/Endpoints/RuntimeAdmin/Models.cs index c73e1a421..b3d35dda1 100644 --- a/src/modules/Elsa.Workflows.Api/Endpoints/RuntimeAdmin/Models.cs +++ b/src/modules/Elsa.Workflows.Api/Endpoints/RuntimeAdmin/Models.cs @@ -8,7 +8,8 @@ public class PauseRequest public string? Reason { get; set; } } -/// Body for the resume endpoint. No fields today — kept as a class so the endpoint signature is uniform. +/// Body for the resume endpoint. +[Obsolete("Use FastEndpoints.EmptyRequest instead.")] public class ResumeRequest { } diff --git a/src/modules/Elsa.Workflows.Api/Endpoints/RuntimeAdmin/Resume/Endpoint.cs b/src/modules/Elsa.Workflows.Api/Endpoints/RuntimeAdmin/Resume/Endpoint.cs index dc247513a..981b61825 100644 --- a/src/modules/Elsa.Workflows.Api/Endpoints/RuntimeAdmin/Resume/Endpoint.cs +++ b/src/modules/Elsa.Workflows.Api/Endpoints/RuntimeAdmin/Resume/Endpoint.cs @@ -12,7 +12,7 @@ namespace Elsa.Workflows.Api.Endpoints.RuntimeAdmin.Resume; /// Idempotent on the success path. /// [PublicAPI] -internal sealed class ResumeEndpoint(IWorkflowRuntimeAdminService admin) : ElsaEndpoint +internal sealed class ResumeEndpoint(IWorkflowRuntimeAdminService admin) : ElsaEndpoint { public override void Configure() { @@ -20,7 +20,7 @@ internal sealed class ResumeEndpoint(IWorkflowRuntimeAdminService admin) : ElsaE ConfigurePermissions(PermissionNames.ManageWorkflowRuntime); } - public override async Task HandleAsync(ResumeRequest req, CancellationToken ct) + public override async Task HandleAsync(EmptyRequest _, CancellationToken ct) { var status = admin.GetStatus(); if ((status.State.Reason & QuiescenceReason.Drain) != 0)