From cc5b3b741c32394096c7c7ace297d13ada5e522c Mon Sep 17 00:00:00 2001 From: JinwooKim Date: Thu, 16 Jan 2025 15:41:14 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20WV-46=20fix=20:=20fix:=20fetch?= =?UTF-8?q?=20=EC=97=94=EB=93=9C=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/news/apis.ts | 4 +--- api/player/apis.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/news/apis.ts b/api/news/apis.ts index 3e84c92..4a6a93f 100644 --- a/api/news/apis.ts +++ b/api/news/apis.ts @@ -1,12 +1,10 @@ -const BASE_URL = process.env.NEXT_PUBLIC_API_KEY; - // news-detail export const getNewsDetail = async ( artcSeq: string ): Promise => { const queryparam = artcSeq ? `newsdetail?artcSeq=${artcSeq}` : ""; - const url = `${BASE_URL}/article/${queryparam}`; + const url = `/api/article/${queryparam}`; const res = await fetch(url); if (!res.ok) { diff --git a/api/player/apis.ts b/api/player/apis.ts index fb1134b..b3298fa 100644 --- a/api/player/apis.ts +++ b/api/player/apis.ts @@ -51,7 +51,7 @@ export const getPitcherDetail = async ( pcode: string ): Promise => { const queryparam = pcode ? `pitcherdetail?pcode=${pcode}` : ""; - const url = `${BASE_URL}/player/${queryparam}`; + const url = `/api/player/${queryparam}`; const response = await fetch(url, { method: "GET" }); if (!response.ok) {