fix: 修复 packages 接口访问不存在字段导致的运行时错误

- 移除 router 中对 result.region、result.currency、pkg.price 的访问
- 修正 pkg.type.value 为 pkg.type (type 是 Literal 不是 Enum)
- 更新协议文档以反映实际实现
- 新增 Apple IAP 协议文档
- 标记未使用的错误码为 RESERVED
This commit is contained in:
ZL-Q
2026-04-28 17:31:24 +08:00
parent 41ade24bcf
commit 86062d5e78
5 changed files with 155 additions and 8 deletions
+1 -4
View File
@@ -63,14 +63,11 @@ async def get_available_packages(
)
return PackagesResponse(
region=result.region,
currency=result.currency,
packages=[
PackageInfo(
productCode=pkg.product_code,
appStoreProductId=pkg.app_store_product_id,
type=pkg.type.value,
price=pkg.price,
type=pkg.type,
credits=pkg.credits,
isStarter=pkg.is_starter,
starterEligible=pkg.starter_eligible,