fix: move url to env

This commit is contained in:
log101 2024-01-27 19:52:36 +03:00
parent 9009ffe8ef
commit c2f8e33ba3

View File

@ -21,7 +21,7 @@ type Content = Omit<ContentTable, 'id' | 'url'>;
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;
---