diff options
Diffstat (limited to 'src/routes/items.svelte')
| -rw-r--r-- | src/routes/items.svelte | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/items.svelte b/src/routes/items.svelte index e0afecc..01a2108 100644 --- a/src/routes/items.svelte +++ b/src/routes/items.svelte @@ -1,9 +1,9 @@ <script lang="ts" context="module"> import type { Load } from '@sveltejs/kit' - import { API_URL } from '$lib/api' + import { fetchApi } from '$lib/api' export const load: Load = async ({ params, fetch }) => { - const data = await fetch(`${API_URL}items`).then(r => r.json()) + const data = await fetchApi(`items`, fetch).then(r => r.json()) return { props: { |
