aboutsummaryrefslogtreecommitdiff
path: root/src/routes/items/+page.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/items/+page.ts')
-rw-r--r--src/routes/items/+page.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/routes/items/+page.ts b/src/routes/items/+page.ts
new file mode 100644
index 0000000..e5bb249
--- /dev/null
+++ b/src/routes/items/+page.ts
@@ -0,0 +1,6 @@
+import { fetchApi } from '$lib/api'
+import type { PageLoad } from './$types'
+
+export const load = (async ({ fetch }) => {
+ return await fetchApi(`items`, fetch).then(r => r.json())
+}) satisfies PageLoad