From 1c70af28c5eb1ca56ae838d91ade1c71c00146ef Mon Sep 17 00:00:00 2001 From: Heeyeun Ko Date: Sat, 16 Nov 2024 04:23:04 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20AI=20=EC=84=9C=EB=B2=84=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=EC=99=84=EB=A3=8C=20=ED=9B=84=20=EC=97=B0=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Camera/CameraPage.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Camera/CameraPage.tsx b/src/pages/Camera/CameraPage.tsx index 35245dc..e3b19cd 100644 --- a/src/pages/Camera/CameraPage.tsx +++ b/src/pages/Camera/CameraPage.tsx @@ -123,12 +123,12 @@ const CameraPage: React.FC = () => { setLoading(true); // 로딩 상태 활성화 try { // 1단계: AI API로 이미지 전송 - const aiResponse = await axios.post("/ai/analyze", { + const aiResponse = await axios.post("34.64.216.227:8080", { image: capturedImage, }); - const fishData = aiResponse.data.fishInfo; + const detections = aiResponse.data; - if (!fishData || fishData.length === 0) { + if (!detections || detections.length === 0) { setLoading(false); navigate("/notfound"); return; @@ -137,7 +137,7 @@ const CameraPage: React.FC = () => { // 2단계: 물고기 데이터 백엔드로 전송 const backendResponse = await axios.post( "/api/v1/pokedex/update", - { caughtPokemons: fishData }, + { caughtPokemons: detections }, { headers: { Authorization: `Bearer ${accessToken}`, // 인증 토큰