From 71ff2a8356e0a8b34ef078e656c55ec5580dfc0f Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Sat, 9 Mar 2024 22:26:19 +0800 Subject: [PATCH] fix: missing _extract_variable_selector_to_variable_mapping --- api/core/workflow/nodes/http_request/http_executor.py | 3 ++- api/core/workflow/nodes/http_request/http_request_node.py | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/api/core/workflow/nodes/http_request/http_executor.py b/api/core/workflow/nodes/http_request/http_executor.py index 4b13e92e0c..82d879a89c 100644 --- a/api/core/workflow/nodes/http_request/http_executor.py +++ b/api/core/workflow/nodes/http_request/http_executor.py @@ -1,10 +1,11 @@ +import re from copy import deepcopy from typing import Any, Union from urllib.parse import urlencode import httpx -import re import requests + import core.helper.ssrf_proxy as ssrf_proxy from core.workflow.nodes.http_request.entities import HttpRequestNodeData diff --git a/api/core/workflow/nodes/http_request/http_request_node.py b/api/core/workflow/nodes/http_request/http_request_node.py index f55f48c4af..e3e864b6b0 100644 --- a/api/core/workflow/nodes/http_request/http_request_node.py +++ b/api/core/workflow/nodes/http_request/http_request_node.py @@ -1,5 +1,5 @@ -from os import error from typing import cast + from core.workflow.entities.base_node_data_entities import BaseNodeData from core.workflow.entities.node_entities import NodeRunResult, NodeType from core.workflow.entities.variable_pool import VariablePool @@ -49,10 +49,12 @@ class HttpRequestNode(BaseNode): @classmethod - def _extract_variable_selector_to_variable_mapping(cls, node_data: BaseNodeData) -> dict[list[str], str]: + def _extract_variable_selector_to_variable_mapping(cls, node_data: HttpRequestNodeData) -> dict[list[str], str]: """ Extract variable selector to variable mapping :param node_data: node data :return: """ - pass \ No newline at end of file + return { + variable_selector.value_selector: variable_selector.variable for variable_selector in node_data.variables + } \ No newline at end of file