From 7cd4d783cdb1accbcd3dc0dc1d76317a9b663ae6 Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 29 Jul 2025 09:34:37 +0800 Subject: [PATCH] perf: Assistant dynamic ds api param --- backend/apps/system/crud/assistant.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/apps/system/crud/assistant.py b/backend/apps/system/crud/assistant.py index c916262b..9b1579fc 100644 --- a/backend/apps/system/crud/assistant.py +++ b/backend/apps/system/crud/assistant.py @@ -101,13 +101,15 @@ class AssistantOutDs: certificateList: list[any] = json.loads(self.certificate) header = {} cookies = {} + param = {} for item in certificateList: if item['target'] == 'header': header[item['key']] = item['value'] if item['target'] == 'cookie': cookies[item['key']] = item['value'] - - res = requests.get(url=endpoint, headers=header, cookies=cookies, timeout=10) + if item['target'] == 'param': + param[item['key']] = item['value'] + res = requests.get(url=endpoint, params=param, headers=header, cookies=cookies, timeout=10) if res.status_code == 200: result_json: dict[any] = json.loads(res.text) if result_json.get('code') == 0: