fix: remove duplicate /api/v1 in article detail route loader
This commit is contained in:
parent
a66db56156
commit
7258f059ce
@ -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 }
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user