Finalize API envelopes and close validation drift tasks

This commit is contained in:
2026-02-07 01:35:56 +01:00
parent f615ef3a4a
commit 20daecd3eb
15 changed files with 104 additions and 109 deletions

View File

@@ -15,7 +15,7 @@ public static class VoteEndpoints
{
var player = await EndpointHelpers.GetAuthenticatedPlayer(ctx, db);
if (player is null)
return Results.Unauthorized();
return EndpointHelpers.UnauthorizedError();
return await service.GetMineAsync(player);
});
@@ -24,7 +24,7 @@ public static class VoteEndpoints
{
var player = await EndpointHelpers.GetAuthenticatedPlayer(ctx, db);
if (player is null)
return Results.Unauthorized();
return EndpointHelpers.UnauthorizedError();
return await service.UpsertAsync(player, request);
});
@@ -32,7 +32,7 @@ public static class VoteEndpoints
{
var player = await EndpointHelpers.GetAuthenticatedPlayer(ctx, db);
if (player is null)
return Results.Unauthorized();
return EndpointHelpers.UnauthorizedError();
return await service.SetFinalizeAsync(player, request);
});