diff --git a/app/api/feishu_external.py b/app/api/feishu_external.py index 95bc668..b07f3e4 100644 --- a/app/api/feishu_external.py +++ b/app/api/feishu_external.py @@ -15,7 +15,7 @@ huobanyun_service = HuobanyunService() async def feishu_external_query( req: FeishuExternalQueryRequest, x_feishu_token: str | None = Header(default=None) ): - if not feishu_service.verify_token(x_feishu_token or req.token): + if not feishu_service.verify_token(x_feishu_token): raise HTTPException(status_code=403, detail="invalid token") result = await huobanyun_service.query(req) options = result.get("options", []) diff --git a/app/services/huobanyun_service.py b/app/services/huobanyun_service.py index 4542da5..7151769 100644 --- a/app/services/huobanyun_service.py +++ b/app/services/huobanyun_service.py @@ -176,7 +176,7 @@ class HuobanyunService: else: offset = 0 - key = req.key or raw.get("key") or raw.get("field") or "" + key = req.key or raw.get("key") or raw.get("field") or req.token or "" key = self._resolve_field_key(str(key)) if key else "" query_value = req.query or req.keyword or "" linkage_params = req.linkage_params or raw.get("linkage_params") or {}