From 216dcab316e080c0c97a0b190207d6453e9be34f Mon Sep 17 00:00:00 2001 From: gamer147 Date: Wed, 10 Jun 2026 08:03:37 -0400 Subject: [PATCH] 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 --- SVSim.EmulatedEntrypoint/Controllers/ReplayController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SVSim.EmulatedEntrypoint/Controllers/ReplayController.cs b/SVSim.EmulatedEntrypoint/Controllers/ReplayController.cs index db4faa6..b9aee5c 100644 --- a/SVSim.EmulatedEntrypoint/Controllers/ReplayController.cs +++ b/SVSim.EmulatedEntrypoint/Controllers/ReplayController.cs @@ -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 Info(CancellationToken ct) + public async Task Info([FromBody] BaseRequest _, CancellationToken ct) { if (!TryGetViewerId(out var vid)) return Unauthorized();