Refactor world bootstrap and allow empty startup worlds
This commit is contained in:
@@ -3,7 +3,7 @@ using SpaceGame.Api.Universe.Simulation;
|
||||
|
||||
namespace SpaceGame.Api.Universe.Api;
|
||||
|
||||
public sealed class UpdateBalanceHandler(WorldService worldService) : Endpoint<BalanceOptions>
|
||||
public sealed class UpdateBalanceHandler(IBalanceService balanceService) : Endpoint<BalanceOptions>
|
||||
{
|
||||
public override void Configure()
|
||||
{
|
||||
@@ -13,7 +13,7 @@ public sealed class UpdateBalanceHandler(WorldService worldService) : Endpoint<B
|
||||
|
||||
public override Task HandleAsync(BalanceOptions req, CancellationToken cancellationToken)
|
||||
{
|
||||
var applied = worldService.UpdateBalance(req);
|
||||
var applied = balanceService.Update(req);
|
||||
return SendOkAsync(applied, cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user