From 27ab854f2e19663c1995232af866178ef2b25895 Mon Sep 17 00:00:00 2001 From: Yilin Xia Date: Wed, 3 Sep 2025 10:45:05 -0500 Subject: [PATCH] fix cloud edge error --- src/lib/config.ts | 1 + src/views/EdgePanel.tsx | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/config.ts b/src/lib/config.ts index 2ccd0d8..c374310 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -10,4 +10,5 @@ export const API_ENDPOINTS = { SUGGEST_TOPICS: `${API_BASE_URL}/api/suggest-topics`, GENERATED_NODES: `${API_BASE_URL}/api/generated-node-gexf`, GET_UNIQUE_REPOS: `${API_BASE_URL}/api/get-unique-repos`, + CREATE_EDGES_ON_GRAPH: `${API_BASE_URL}/api/create-edges-on-graph`, } as const; \ No newline at end of file diff --git a/src/views/EdgePanel.tsx b/src/views/EdgePanel.tsx index dd5b43f..4ac57d3 100644 --- a/src/views/EdgePanel.tsx +++ b/src/views/EdgePanel.tsx @@ -5,6 +5,7 @@ import Slider from "rc-slider"; import { GraphContext } from "../lib/context"; import { useNotifications } from "../lib/notifications"; +import { API_ENDPOINTS } from "../lib/config"; const EdgePanel: FC<{ isExpanded: boolean }> = ({ isExpanded }) => { const { navState, setNavState, setShowEdgePanel, data, graphFile, computedData, setData } = useContext(GraphContext); @@ -214,7 +215,7 @@ const EdgePanel: FC<{ isExpanded: boolean }> = ({ isExpanded }) => { }; // Call backend API with original graph - const response = await fetch('http://127.0.0.1:5002/api/create-edges-on-graph', { + const response = await fetch(API_ENDPOINTS.CREATE_EDGES_ON_GRAPH, { method: 'POST', headers: { 'Content-Type': 'application/json',