using FastEndpoints;

namespace SpaceGame.Api.Universe.Api;

public sealed class ResetWorldHandler(WorldService worldService) : EndpointWithoutRequest
{
    public override void Configure()
    {
        Post("/api/world/reset");
        Policies(AuthPolicyNames.GmAccess);
    }

    public override Task HandleAsync(CancellationToken cancellationToken) =>
      SendOkAsync(worldService.Reset(), cancellationToken);
}
