From 3fefb4b22fd0cafea823737b671794a91feb6610 Mon Sep 17 00:00:00 2001 From: nalpari Date: Tue, 13 May 2025 16:33:37 +0900 Subject: [PATCH] feat: update environment variables and API endpoint in useImgLoader hook --- .env.development | 2 ++ .env.production | 2 ++ src/hooks/floorPlan/useImgLoader.js | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 6488b496..1ca922e7 100644 --- a/.env.development +++ b/.env.development @@ -2,6 +2,8 @@ NEXT_PUBLIC_API_SERVER_PATH="http://1.248.227.176:38080" NEXT_PUBLIC_HOST_URL="//1.248.227.176:4000" +NEXT_PUBLIC_API_HOST_URL="http://1.248.227.176:5000" + SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y=" # NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_bV5zuYMyyIYFlOb3" diff --git a/.env.production b/.env.production index 767c3e4b..3842b041 100644 --- a/.env.production +++ b/.env.production @@ -2,6 +2,8 @@ NEXT_PUBLIC_API_SERVER_PATH="https://api.hanasys.jp/" NEXT_PUBLIC_HOST_URL="//1.248.227.176:4000" +NEXT_PUBLIC_API_HOST_URL="https://www.hanasys.jp/" + SESSION_SECRET="i3iHH1yp2/2SpQSIySQ4bpyc4g0D+zCF9FAn5xUG0+Y=" # NEXT_PUBLIC_CONVERTER_API_URL="https://v2.convertapi.com/convert/dwg/to/png?Secret=secret_bV5zuYMyyIYFlOb3" diff --git a/src/hooks/floorPlan/useImgLoader.js b/src/hooks/floorPlan/useImgLoader.js index 2a5a09ab..ca5fef79 100644 --- a/src/hooks/floorPlan/useImgLoader.js +++ b/src/hooks/floorPlan/useImgLoader.js @@ -79,8 +79,8 @@ export function useImgLoader() { /** 이미지 크롭 요청 */ const result = await post({ - // url: `${process.env.NEXT_PUBLIC_HOST_URL}/image/canvas`, - url: `http://localhost:3000/api/image/canvas`, + // url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/image/canvas`, + url: `${process.env.NEXT_PUBLIC_API_HOST_URL}/api/image/canvas`, data: formData, }) console.log('🚀 ~ handleCanvasToPng ~ result:', result)