From 2f9f51ec7cd173e5819d2f40ad473868afebf0b7 Mon Sep 17 00:00:00 2001 From: Bram Suurd <78373894+BramSuurdje@users.noreply.github.com> Date: Tue, 5 Nov 2024 00:20:10 +0100 Subject: [PATCH] Fix API path in category fetch calls by removing leading slash --- frontend/src/app/scripts/page.tsx | 2 +- frontend/src/components/CommandMenu.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/scripts/page.tsx b/frontend/src/app/scripts/page.tsx index 23143b1c..2ccbc7fc 100644 --- a/frontend/src/app/scripts/page.tsx +++ b/frontend/src/app/scripts/page.tsx @@ -48,7 +48,7 @@ function ScriptContent() { useEffect(() => { fetch( - `/api/categories?_=${process.env.NEXT_PUBLIC_BUILD_TIME || Date.now()}`, + `api/categories?_=${process.env.NEXT_PUBLIC_BUILD_TIME || Date.now()}`, ) .then((response) => response.json()) .then((categories) => { diff --git a/frontend/src/components/CommandMenu.tsx b/frontend/src/components/CommandMenu.tsx index e830b2ba..e5157e03 100644 --- a/frontend/src/components/CommandMenu.tsx +++ b/frontend/src/components/CommandMenu.tsx @@ -53,7 +53,7 @@ export default function CommandMenu() { const fetchCategories = async () => { setIsLoading(true); fetch( - `/api/categories?_=${process.env.NEXT_PUBLIC_BUILD_TIME || Date.now()}`, + `api/categories?_=${process.env.NEXT_PUBLIC_BUILD_TIME || Date.now()}`, ) .then((response) => response.json()) .then((categories) => {