Skip to content

Commit 8382b90

Browse files
committed
feat: resolve request header variables during graph computation
1 parent 6dfc03d commit 8382b90

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

packages/flowtest-cli/graph/compute/requestnode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class requestNode extends Node {
119119

120120
if (this.nodeData.headers && this.nodeData.headers.length > 0) {
121121
this.nodeData.headers.map((pair, index) => {
122-
headers[pair.name] = pair.value;
122+
headers[computeVariables(pair.name, variablesDict)] = computeVariables(pair.value, variablesDict);
123123
});
124124
}
125125

src/components/molecules/flow/graph/compute/requestnode.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class requestNode extends Node {
9999

100100
if (this.nodeData.headers && this.nodeData.headers.length > 0) {
101101
this.nodeData.headers.map((pair, index) => {
102-
headers[pair.name] = pair.value;
102+
headers[computeVariables(pair.name, variablesDict)] = computeVariables(pair.value, variablesDict);
103103
});
104104
}
105105

src/stores/CanvasStore.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,6 @@ const useCanvasStore = create((set, get) => ({
362362
set({
363363
nodes: get().nodes.map((node) => {
364364
if (node.id === nodeId) {
365-
console.log(node.data?.headers);
366365
// it's important to create a new object here, to inform React Flow about the cahnges
367366
if (Object.entries(headers).length === 0) {
368367
const { ['headers']: _, ...data } = node.data;

0 commit comments

Comments
 (0)