Use /api
This commit is contained in:
parent
915a1823e3
commit
8491fb7096
|
@ -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({
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue