feat(mission): /mission/buy_additional_right stub (refresh-only, no decomp)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -116,6 +116,23 @@ public class MissionController : SVSimController
|
||||
return Ok(dto);
|
||||
}
|
||||
|
||||
[HttpPost("buy_additional_right")]
|
||||
public async Task<IActionResult> BuyAdditionalRight(BaseRequest _, CancellationToken ct)
|
||||
{
|
||||
if (!TryGetViewerId(out long viewerId)) return Unauthorized();
|
||||
|
||||
// The client-side task class is absent from the decompilation; the URL is
|
||||
// registered but no Parse() is documented. Spec marks the shape as INFERRED.
|
||||
// Safe stub: refresh MissionInfoDetail and let the client re-render — same
|
||||
// shape as /mission/info. No currency debit until we see a real wire call.
|
||||
var viewer = await LoadViewer(viewerId, ct);
|
||||
await _state.EnsureCurrentAsync(viewer.Id, ct);
|
||||
await _db.SaveChangesAsync(ct);
|
||||
|
||||
var dto = await _assembler.BuildAsync(viewer, ct);
|
||||
return Ok(dto);
|
||||
}
|
||||
|
||||
private Task<Viewer> LoadViewer(long viewerId, CancellationToken ct) =>
|
||||
_db.Viewers
|
||||
.Include(v => v.MissionData)
|
||||
|
||||
Reference in New Issue
Block a user