feat(bp): /battle_pass/item_list — derives product per active season
Adds BattlePassSalesPeriodInfoDto, BattlePassProductDto, BattlePassItemListResponse DTOs, GetItemListAsync on BattlePassService (one product if not premium + CanPurchase, empty if already premium or off-season), and the /battle_pass/item_list controller action. 2 new integration tests; all 408 pass.
This commit is contained in:
@@ -28,4 +28,14 @@ public class BattlePassController : SVSimController
|
||||
if (info is null) return Ok(new { }); // off-season: empty payload
|
||||
return Ok(info);
|
||||
}
|
||||
|
||||
[HttpPost("item_list")]
|
||||
public async Task<IActionResult> ItemList(BaseRequest request, CancellationToken ct)
|
||||
{
|
||||
if (!TryGetViewerId(out long viewerId)) return Unauthorized();
|
||||
|
||||
var list = await _battlePass.GetItemListAsync(viewerId, ct);
|
||||
if (list is null) return Ok(new { });
|
||||
return Ok(list);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user