Fix base URL formatting in serverCall for API requests
This commit is contained in:
@@ -7,7 +7,7 @@ export async function serverCall(
|
|||||||
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH",
|
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH",
|
||||||
body?: unknown
|
body?: unknown
|
||||||
): Promise<Response> {
|
): Promise<Response> {
|
||||||
const url = `${process.env.INTERNAL_BACKEND_URL ?? "http://localhost:8080/api"}${path}`;
|
const url = `${process.env.INTERNAL_BACKEND_URL ?? "http://localhost:8080"}/api${path}`;
|
||||||
const session = await getServerSession(authOptions);
|
const session = await getServerSession(authOptions);
|
||||||
|
|
||||||
const headers: Record<string, string> = {
|
const headers: Record<string, string> = {
|
||||||
|
|||||||
Reference in New Issue
Block a user