JacobJA commited on
Commit
7bf4917
·
1 Parent(s): 557bf7c

Fix API URL fallback

Browse files
Files changed (1) hide show
  1. frontend/lib/api.ts +10 -2
frontend/lib/api.ts CHANGED
@@ -3,7 +3,12 @@ import type { SystemForgeResponse } from "./types";
3
  export async function generateWorkflowRedesign(
4
  workflowSteps: string[]
5
  ): Promise<SystemForgeResponse> {
6
- const API_URL = process.env.NEXT_PUBLIC_API_URL;
 
 
 
 
 
7
 
8
  if (!API_URL) {
9
  throw new Error(
@@ -41,7 +46,10 @@ export async function generateWorkflowRedesign(
41
  export async function downloadArchitectureReport(
42
  workflowSteps: string[]
43
  ): Promise<void> {
44
- const API_URL = process.env.NEXT_PUBLIC_API_URL;
 
 
 
45
 
46
  if (!API_URL) {
47
  throw new Error(
 
3
  export async function generateWorkflowRedesign(
4
  workflowSteps: string[]
5
  ): Promise<SystemForgeResponse> {
6
+ const API_URL =
7
+ process.env.NEXT_PUBLIC_API_URL ||
8
+ process.env.NEXT_PUBLIC_BACKEND_URL ||
9
+ "";
10
+
11
+ console.log("API_URL =", API_URL);
12
 
13
  if (!API_URL) {
14
  throw new Error(
 
46
  export async function downloadArchitectureReport(
47
  workflowSteps: string[]
48
  ): Promise<void> {
49
+ const API_URL =
50
+ process.env.NEXT_PUBLIC_API_URL ||
51
+ process.env.NEXT_PUBLIC_BACKEND_URL ||
52
+ "";
53
 
54
  if (!API_URL) {
55
  throw new Error(