Cleanup
This commit is contained in:
parent
ecb95cc35d
commit
548bb34d3e
|
|
@ -1,21 +1,22 @@
|
|||
using System.Reflection;
|
||||
using Elsa.Abstractions;
|
||||
using FastEndpoints;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace Elsa.Workflows.Api.Endpoints.Package;
|
||||
|
||||
/// <inheritdoc />
|
||||
public class GetVersion : Endpoint<Request, Response>
|
||||
/// <summary>
|
||||
/// Returns the package informational version.
|
||||
/// </summary>
|
||||
[PublicAPI]
|
||||
internal class Version : EndpointWithoutRequest<Response>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void Configure()
|
||||
{
|
||||
Get("/package/version");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override async Task HandleAsync(Request request, CancellationToken cancellationToken)
|
||||
|
||||
public override async Task HandleAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
var assembly = Assembly.GetExecutingAssembly();
|
||||
var versionAttribute = assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>();
|
||||
|
|
@ -1,13 +1,3 @@
|
|||
namespace Elsa.Workflows.Api.Endpoints.Package;
|
||||
|
||||
public class Response
|
||||
{
|
||||
public Response(string packageVersion)
|
||||
{
|
||||
PackageVersion = packageVersion;
|
||||
}
|
||||
|
||||
public string PackageVersion { get; set; }
|
||||
}
|
||||
|
||||
public class Request {}
|
||||
internal record Response(string PackageVersion);
|
||||
Loading…
Reference in a new issue