Refactor backend into domain-first slices

This commit is contained in:
2026-03-19 18:15:44 -04:00
parent 07a3142316
commit 9a5040cf1f
53 changed files with 94 additions and 140 deletions

View File

@@ -0,0 +1,23 @@
using FastEndpoints;
namespace SpaceGame.Api.Universe.Api;
public sealed class GetWorldHealthHandler(WorldService worldService) : EndpointWithoutRequest
{
public override void Configure()
{
Get("/api/world/health");
AllowAnonymous();
}
public override Task HandleAsync(CancellationToken cancellationToken)
{
var status = worldService.GetStatus();
return SendOkAsync(new
{
ok = true,
sequence = status.Sequence,
generatedAtUtc = status.GeneratedAtUtc,
}, cancellationToken);
}
}