diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index a81c9647..c1cca3ca 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -43,9 +43,8 @@ jobs: - name: Start frontend env: - APP_URL: http://localhost:8080 API_URL: http://localhost:3333 - NEXT_PUBLIC_API_URL: xyzPLACEHOLDERxyz + NEXT_PUBLIC_API_URL: http://localhost:3333 timeout-minutes: 2 run: (npm run build:frontend && npm run start:frontend) & npx wait-on http://localhost:8080/ diff --git a/ops b/ops index 00491dde..e2343509 160000 --- a/ops +++ b/ops @@ -1 +1 @@ -Subproject commit 00491dde8c84575ba4169fdc92b5116faa6d0cfe +Subproject commit e2343509601f6598dcecdc894e3af266900f97a3 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")) {