From 6fc5903b9b820997285921f46c4153d02b95595e Mon Sep 17 00:00:00 2001 From: Milo Schwartz Date: Sun, 20 Oct 2024 15:21:33 -0400 Subject: [PATCH 1/2] hardcode api url --- src/api/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/index.ts b/src/api/index.ts index 792778f6..2ab1b4ec 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -1,7 +1,7 @@ import axios from "axios"; export const api = axios.create({ - baseURL: process.env.NEXT_PUBLIC_EXTERNAL_API_BASE_URL, + baseURL: "https://fossorial.io/api/v1", timeout: 10000, headers: { "Content-Type": "application/json", @@ -9,7 +9,7 @@ export const api = axios.create({ }); export const internal = axios.create({ - baseURL: process.env.NEXT_PUBLIC_INTERNAL_API_BASE_URL, + baseURL: "http://localhost:3000/api/v1", timeout: 10000, headers: { "Content-Type": "application/json", From 02d185f7130be2eb2e2a2d8046bd7762c4bc9180 Mon Sep 17 00:00:00 2001 From: Owen Schwartz Date: Sun, 20 Oct 2024 15:21:22 -0400 Subject: [PATCH 2/2] Remove org get for testing --- src/app/layout.tsx | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/app/layout.tsx b/src/app/layout.tsx index b9ac1f3b..030c4c7b 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -21,22 +21,22 @@ export default async function RootLayout({ }: Readonly<{ children: React.ReactNode; }>) { - let orgs: ListOrgsResponse["orgs"] = []; - try { - const res = await internal.get>( - `/orgs`, - authCookieHeader(), - ); - if (res && res.data.data.orgs) { - orgs = res.data.data.orgs; - } + // let orgs: ListOrgsResponse["orgs"] = []; + // try { + // const res = await internal.get>( + // `/orgs`, + // authCookieHeader(), + // ); + // if (res && res.data.data.orgs) { + // orgs = res.data.data.orgs; + // } - if (!orgs.length) { - redirect(`/setup`); - } - } catch (e) { - console.error("Error fetching orgs", e); - } + // if (!orgs.length) { + // redirect(`/setup`); + // } + // } catch (e) { + // console.error("Error fetching orgs", e); + // } return (