Fix base URL formatting in serverCall for API requests

This commit is contained in:
2025-07-06 19:59:50 +02:00
parent 54793437a1
commit 4b08e5e58c

View File

@@ -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> = {