Refactor runtime bootstrap and ship control flows
This commit is contained in:
17
apps/backend/Universe/Api/GetVersionHandler.cs
Normal file
17
apps/backend/Universe/Api/GetVersionHandler.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using FastEndpoints;
|
||||
|
||||
namespace SpaceGame.Api.Universe.Api;
|
||||
|
||||
public sealed class GetVersionHandler(AppVersionService appVersionService) : EndpointWithoutRequest<VersionInfoSnapshot>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Get("/api/version");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override async Task HandleAsync(CancellationToken cancellationToken)
|
||||
{
|
||||
await SendOkAsync(appVersionService.GetSnapshot(), cancellationToken);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user