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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user