From 74f32700444021600af14208f1801e27c9914589 Mon Sep 17 00:00:00 2001 From: hayoung78 Date: Thu, 16 Jan 2025 17:36:20 +0900 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20WV-42=20refactor=20:=20api?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/news/apis.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/news/apis.ts b/api/news/apis.ts index 4a6a93f..6684d27 100644 --- a/api/news/apis.ts +++ b/api/news/apis.ts @@ -1,10 +1,10 @@ // news-detail +const BASE_URL = process.env.NEXT_PUBLIC_API_KEY; export const getNewsDetail = async ( artcSeq: string ): Promise => { const queryparam = artcSeq ? `newsdetail?artcSeq=${artcSeq}` : ""; - - const url = `/api/article/${queryparam}`; + const url = `http://${BASE_URL}/api/article/${queryparam}`; const res = await fetch(url); if (!res.ok) {