From 8491fb70963a2b5d5cc4ec687ba90c7235c0a9ad Mon Sep 17 00:00:00 2001 From: powermaker450 Date: Thu, 12 Sep 2024 19:47:49 -0400 Subject: [PATCH] Use /api --- src/pages/Home.tsx | 4 ++-- src/pages/ReviewsPage.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index f3258d4..dff2633 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -77,8 +77,8 @@ function Home({ endpoint, setEndpoint, secure, setSecure }: HomeProps) { await fetch( endpoint - ? `${secure ? "https" : "http"}://${endpoint}/post` - : "http://localhost:8080/post", + ? `${secure ? "https" : "http"}://${endpoint}/api/post` + : "http://localhost:8080/api/post", { method: "POST", body: JSON.stringify({ diff --git a/src/pages/ReviewsPage.tsx b/src/pages/ReviewsPage.tsx index c3b2794..a9bbe7f 100644 --- a/src/pages/ReviewsPage.tsx +++ b/src/pages/ReviewsPage.tsx @@ -30,8 +30,8 @@ function ReviewsPage({ endpoint, secure }: ReviewsPageProps) { await fetch( endpoint - ? `${secure ? "https" : "http"}://${endpoint}/reviews` - : "http://localhost:8080/reviews", + ? `${secure ? "https" : "http"}://${endpoint}/api/reviews` + : "http://localhost:8080/api/reviews", ) .then(async (r) => { const response: ServerSideReview[] = await r.json();