From a6d24eb649b6720bf176fe7a08b25d4480f99908 Mon Sep 17 00:00:00 2001 From: Factiven Date: Mon, 17 Apr 2023 13:53:51 +0700 Subject: 1st fixes --- pages/profile/[user].js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pages/profile') diff --git a/pages/profile/[user].js b/pages/profile/[user].js index b40c41a..3cff4bd 100644 --- a/pages/profile/[user].js +++ b/pages/profile/[user].js @@ -1,5 +1,3 @@ -const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000"; - import { getServerSession } from "next-auth"; import { authOptions } from "../api/auth/[...nextauth]"; import Navbar from "../../components/navbar"; @@ -301,7 +299,7 @@ export async function getServerSideProps(context) { const session = await getServerSession(context.req, context.res, authOptions); const query = context.query; - const res = await fetch(`${baseUrl}/api/get-media`, { + const res = await fetch(`/api/get-media`, { method: "POST", body: JSON.stringify({ username: query.user, -- cgit v1.2.3