From dfd65cb0b47988dcbbef65d2bd6aa1b40a52952c Mon Sep 17 00:00:00 2001 From: Heeyeun Ko Date: Sat, 16 Nov 2024 04:37:09 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20AI=20=EC=97=B0=EB=8F=99=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Camera/CameraPage.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/Camera/CameraPage.tsx b/src/pages/Camera/CameraPage.tsx index e3b19cd..6577294 100644 --- a/src/pages/Camera/CameraPage.tsx +++ b/src/pages/Camera/CameraPage.tsx @@ -6,6 +6,7 @@ import { Button, Flex, IconButton, useToast } from "@chakra-ui/react"; import { CameraIcon, ImageIcon, SwitchCameraIcon } from "lucide-react"; import axios from "axios"; import LoadingSpinner from "../../components/LoadingSpinner"; +import { API_BASE_URL } from "../../api/constant"; const CameraPage: React.FC = () => { const navigate = useNavigate(); @@ -123,7 +124,7 @@ const CameraPage: React.FC = () => { setLoading(true); // 로딩 상태 활성화 try { // 1단계: AI API로 이미지 전송 - const aiResponse = await axios.post("34.64.216.227:8080", { + const aiResponse = await axios.post("http://34.64.216.227:8080", { image: capturedImage, }); const detections = aiResponse.data; @@ -136,7 +137,7 @@ const CameraPage: React.FC = () => { // 2단계: 물고기 데이터 백엔드로 전송 const backendResponse = await axios.post( - "/api/v1/pokedex/update", + `${API_BASE_URL}/api/v1/pokedex/update`, { caughtPokemons: detections }, { headers: {