diff --git a/frontend/src/routes/docs/+page.ts b/frontend/src/routes/docs/+page.ts index 592ae99..d5e29b6 100644 --- a/frontend/src/routes/docs/+page.ts +++ b/frontend/src/routes/docs/+page.ts @@ -3,7 +3,7 @@ import type { DocsIndexEntry } from '$types/docs'; import { error } from '@sveltejs/kit'; export const load: PageLoad = async ({ fetch }) => { - const res = await fetch('/docs'); + const res = await fetch('/api/docs'); if (!res.ok) { throw error(500, 'Gagal memuat daftar dokumentasi'); } diff --git a/frontend/src/routes/docs/[slug]/+page.ts b/frontend/src/routes/docs/[slug]/+page.ts index 0aa8c90..706bab1 100644 --- a/frontend/src/routes/docs/[slug]/+page.ts +++ b/frontend/src/routes/docs/[slug]/+page.ts @@ -3,7 +3,7 @@ import type { DocContent } from '$types/docs'; import { error } from '@sveltejs/kit'; export const load: PageLoad = async ({ params, fetch }) => { - const res = await fetch(`/docs/${params.slug}`); + const res = await fetch(`/api/docs/${params.slug}`); if (!res.ok) { throw error(404, 'Dokumen tidak ditemukan'); }