From c2f8e33ba386403090b36f47353932cfd3b6bb35 Mon Sep 17 00:00:00 2001 From: log101 Date: Sat, 27 Jan 2024 19:52:36 +0300 Subject: [PATCH] fix: move url to env --- src/pages/[id].astro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/[id].astro b/src/pages/[id].astro index 2ecfab6..82d26f2 100644 --- a/src/pages/[id].astro +++ b/src/pages/[id].astro @@ -21,7 +21,7 @@ type Content = Omit; const { id } = Astro.params; -const res = await fetch(`http://localhost:4321/api/content?id=${id}`); +const res = await fetch(`${import.meta.env.HOME_URL}/api/content?id=${id}`); const data: Content | null = res.status === 200 ? await res.json() : null; ---