fix(replay): add BaseRequest body param to /replay/info
The translation middleware throws InvalidOperationException when an action has no body parameters and a Unity client sends an encrypted msgpack body. Tests pass without it because they post JSON directly and bypass the middleware (no UnityPlayer User-Agent). See RankBattleController.ForceFinish for the documented convention. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ using System.Globalization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using SVSim.Database.Services.Replay;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Replay;
|
||||
using SVSim.EmulatedEntrypoint.Models.Dtos.Requests;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Controllers;
|
||||
|
||||
@@ -23,7 +24,7 @@ public sealed class ReplayController : SVSimController
|
||||
public ReplayController(IReplayHistoryReader reader) => _reader = reader;
|
||||
|
||||
[HttpPost("info")]
|
||||
public async Task<IActionResult> Info(CancellationToken ct)
|
||||
public async Task<IActionResult> Info([FromBody] BaseRequest _, CancellationToken ct)
|
||||
{
|
||||
if (!TryGetViewerId(out var vid)) return Unauthorized();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user