feat(huya): 统一积分兑换并完善兑换记录
This commit is contained in:
@@ -31,10 +31,21 @@ def create_browser_exchange_kit(
|
||||
raise HTTPException(status_code=400, detail="该账号没有可用 Cookie,请先登录")
|
||||
config = ensure_huya_config(db)
|
||||
room_pid = huya_config_value("room_pid", config.room_pid)
|
||||
points_page_code = huya_config_value("points_page_code", config.points_page_code)
|
||||
points_source_id = huya_config_value("points_source_id", config.points_source_id)
|
||||
target = req.target if req and req.target else DEFAULT_EXCHANGE_TARGET
|
||||
targets = exchange_target_options(room_pid)
|
||||
targets = exchange_target_options(
|
||||
room_pid,
|
||||
points_page_code=points_page_code,
|
||||
points_source_id=points_source_id,
|
||||
)
|
||||
try:
|
||||
target_url = exchange_target_url(target, room_pid)
|
||||
target_url = exchange_target_url(
|
||||
target,
|
||||
room_pid,
|
||||
points_page_code=points_page_code,
|
||||
points_source_id=points_source_id,
|
||||
)
|
||||
except ValueError as exc:
|
||||
raise HTTPException(status_code=400, detail=str(exc)) from exc
|
||||
pairs = dict(cookie_pairs(normalize_huya_cookie(account.cookie)))
|
||||
|
||||
Reference in New Issue
Block a user