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