From 668be791db2e06fdb00dbafdc6e444ce9aba56ab Mon Sep 17 00:00:00 2001 From: hughcrt Date: Fri, 29 Mar 2024 20:18:32 -0300 Subject: [PATCH] test --- packages/frontend/components/layout/Navbar.tsx | 2 +- packages/frontend/next.config.js | 8 ++++---- packages/frontend/pages/request-password-reset.tsx | 2 +- packages/frontend/pages/team.tsx | 6 +++--- packages/frontend/utils/fetcher/client.ts | 3 +-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/frontend/components/layout/Navbar.tsx b/packages/frontend/components/layout/Navbar.tsx index b196fca8..29d1f96e 100644 --- a/packages/frontend/components/layout/Navbar.tsx +++ b/packages/frontend/components/layout/Navbar.tsx @@ -57,7 +57,7 @@ export default function Navbar() { setSendingEmail(true) const ok = await errorHandler( - fetch(`${process.env.API_URL}/v1/users/send-verification`, { + fetch(`${process.env.NEXT_PUBLIC_API_URL}/v1/users/send-verification`, { method: "POST", body: JSON.stringify({ email: user?.email, diff --git a/packages/frontend/next.config.js b/packages/frontend/next.config.js index 2b7d4395..02b49ace 100644 --- a/packages/frontend/next.config.js +++ b/packages/frontend/next.config.js @@ -22,7 +22,7 @@ const nextConfig = { ], }, async rewrites() { - if(!process.env.API_URL) { + if(!process.env.NEXT_PUBLIC_API_URL) { return [] } @@ -33,15 +33,15 @@ const nextConfig = { }, { source: "/api/v1/report", - destination: process.env.API_URL + "/api/report", + destination: process.env.NEXT_PUBLIC_API_URL + "/api/report", }, { source: "/api/report", - destination: process.env.API_URL + "/api/report", + destination: process.env.NEXT_PUBLIC_API_URL + "/api/report", }, { source: "/api/v1/template", - destination: process.env.API_URL + "/api/v1/template", + destination: process.env.NEXT_PUBLIC_API_URL + "/api/v1/template", }, ] }, diff --git a/packages/frontend/pages/request-password-reset.tsx b/packages/frontend/pages/request-password-reset.tsx index 35f11788..a06c161f 100644 --- a/packages/frontend/pages/request-password-reset.tsx +++ b/packages/frontend/pages/request-password-reset.tsx @@ -31,7 +31,7 @@ export default function PasswordReset() { setLoading(true) const res = await errorHandler( - fetch(`${process.env.API_URL}/auth/request-password-reset`, { + fetch(`${process.env.NEXT_PUBLIC_API_URL}/auth/request-password-reset`, { method: "POST", headers: { "Content-Type": "application/json", diff --git a/packages/frontend/pages/team.tsx b/packages/frontend/pages/team.tsx index 5e056a86..45922703 100644 --- a/packages/frontend/pages/team.tsx +++ b/packages/frontend/pages/team.tsx @@ -149,7 +149,7 @@ function SAMLConfig() { Assertion Consumer Service (ACS) URL: @@ -157,7 +157,7 @@ function SAMLConfig() { Single Logout Service (SLO) URL: @@ -173,7 +173,7 @@ function SAMLConfig() { Single Logout URL: diff --git a/packages/frontend/utils/fetcher/client.ts b/packages/frontend/utils/fetcher/client.ts index be563ea8..e2bfe562 100644 --- a/packages/frontend/utils/fetcher/client.ts +++ b/packages/frontend/utils/fetcher/client.ts @@ -2,8 +2,7 @@ import Router from "next/router" import { signOut } from "../auth" import { showErrorNotification } from "../errors" -const BASE_URL = - (process.env.API_URL as string) || process.env.NEXT_PUBLIC_API_URL +const BASE_URL = process.env.NEXT_PUBLIC_API_URL as string export function buildUrl(path: string) { if (path.includes("/auth")) {