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",
|
||||
body?: unknown
|
||||
): 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 headers: Record<string, string> = {
|
||||
|
||||
Reference in New Issue
Block a user