improvement on gm windows, ai
This commit is contained in:
16
apps/backend/Universe/Api/GetBalanceHandler.cs
Normal file
16
apps/backend/Universe/Api/GetBalanceHandler.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using FastEndpoints;
|
||||
using SpaceGame.Api.Universe.Simulation;
|
||||
|
||||
namespace SpaceGame.Api.Universe.Api;
|
||||
|
||||
public sealed class GetBalanceHandler(WorldService worldService) : EndpointWithoutRequest
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
Get("/api/balance");
|
||||
AllowAnonymous();
|
||||
}
|
||||
|
||||
public override Task HandleAsync(CancellationToken cancellationToken) =>
|
||||
SendOkAsync(worldService.GetBalance(), cancellationToken);
|
||||
}
|
||||
Reference in New Issue
Block a user