Skip to content

Commit 2f9f51e

Browse files
committed
Fix API path in category fetch calls by removing leading slash
1 parent 1a412bc commit 2f9f51e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

frontend/src/app/scripts/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function ScriptContent() {
4848

4949
useEffect(() => {
5050
fetch(
51-
`/api/categories?_=${process.env.NEXT_PUBLIC_BUILD_TIME || Date.now()}`,
51+
`api/categories?_=${process.env.NEXT_PUBLIC_BUILD_TIME || Date.now()}`,
5252
)
5353
.then((response) => response.json())
5454
.then((categories) => {

frontend/src/components/CommandMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export default function CommandMenu() {
5353
const fetchCategories = async () => {
5454
setIsLoading(true);
5555
fetch(
56-
`/api/categories?_=${process.env.NEXT_PUBLIC_BUILD_TIME || Date.now()}`,
56+
`api/categories?_=${process.env.NEXT_PUBLIC_BUILD_TIME || Date.now()}`,
5757
)
5858
.then((response) => response.json())
5959
.then((categories) => {

0 commit comments

Comments
 (0)