Use /api
This commit is contained in:
parent
915a1823e3
commit
8491fb7096
|
@ -77,8 +77,8 @@ function Home({ endpoint, setEndpoint, secure, setSecure }: HomeProps) {
|
||||||
|
|
||||||
await fetch(
|
await fetch(
|
||||||
endpoint
|
endpoint
|
||||||
? `${secure ? "https" : "http"}://${endpoint}/post`
|
? `${secure ? "https" : "http"}://${endpoint}/api/post`
|
||||||
: "http://localhost:8080/post",
|
: "http://localhost:8080/api/post",
|
||||||
{
|
{
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
|
|
|
@ -30,8 +30,8 @@ function ReviewsPage({ endpoint, secure }: ReviewsPageProps) {
|
||||||
|
|
||||||
await fetch(
|
await fetch(
|
||||||
endpoint
|
endpoint
|
||||||
? `${secure ? "https" : "http"}://${endpoint}/reviews`
|
? `${secure ? "https" : "http"}://${endpoint}/api/reviews`
|
||||||
: "http://localhost:8080/reviews",
|
: "http://localhost:8080/api/reviews",
|
||||||
)
|
)
|
||||||
.then(async (r) => {
|
.then(async (r) => {
|
||||||
const response: ServerSideReview[] = await r.json();
|
const response: ServerSideReview[] = await r.json();
|
||||||
|
|
Loading…
Reference in a new issue