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) {