fix: remove duplicate /api/v1 in article detail route loader

This commit is contained in:
dimitar committed 2026-02-28 23:37:12 +01:00
1 parent a66db56156
commit 7258f059ce
1 file changed
+1 -1
+1 -1
View File
@@ -196,7 +196,7 @@ const articleDetailRoute = createRoute({
return <ArticleDetailComponent id={id} /> return <ArticleDetailComponent id={id} />
}, },
loader: async ({ params }) => { loader: async ({ params }) => {
const response = await fetch(`${import.meta.env.VITE_API_URL || 'http://localhost:3000'}/api/v1/articles/${params.id}`) const response = await fetch(`${import.meta.env.VITE_API_URL || 'http://localhost:3000/api/v1'}/articles/${params.id}`)
if (!response.ok) { if (!response.ok) {
return { article: null } return { article: null }
} }