fix(arena): match prod get_challenge_info wire shape; stub ranking_history
Prod /arena/get_challenge_info capture (Season 26):
- reward_step_info.reward_step_list is a Dict<string,string>
({"5":"5","10":"10","15":"15"}), not the List<int> I'd assumed
- max_reward_step is stringified
The previous stub would have parsed at the client (LitJson tolerates the
shape via indexed iteration), but cleaning to match prod exactly.
Also stubs /arena/get_challenge_ranking_history (new endpoint observed
in the same capture). Prod ships {two_pick: [], sealed: []} with no
history populated — empty lists match. Routing smoke added.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,14 @@ public class ArenaController : SVSimController
|
||||
catch { /* fall back to defaults */ }
|
||||
}
|
||||
|
||||
// Default Challenge Master reward steps from prod capture: 3 milestones at 5/10/15 wins.
|
||||
var rewardSteps = new Dictionary<string, string>
|
||||
{
|
||||
["5"] = "5",
|
||||
["10"] = "10",
|
||||
["15"] = "15",
|
||||
};
|
||||
|
||||
return Ok(new GetChallengeInfoResponseDto
|
||||
{
|
||||
ChallengeName = name,
|
||||
@@ -51,9 +59,17 @@ public class ArenaController : SVSimController
|
||||
TwoPickAllWinCount = 0,
|
||||
RewardStepInfo = new RewardStepInfoDto
|
||||
{
|
||||
MaxRewardStep = 0,
|
||||
RewardStepList = new List<int>(),
|
||||
MaxRewardStep = 15,
|
||||
RewardStepList = rewardSteps,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
[HttpPost("get_challenge_ranking_history")]
|
||||
public IActionResult GetChallengeRankingHistory([FromBody] GetChallengeInfoRequest req)
|
||||
{
|
||||
if (!TryGetViewerId(out _)) return Unauthorized();
|
||||
// Prod returns {two_pick: [], sealed: []}. Stub matches.
|
||||
return Ok(new GetChallengeRankingHistoryResponseDto());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user