mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-19 12:24:46 +08:00
fix: fix getBackendBaseURL()
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
import { env } from "@/env";
|
import { env } from "@/env";
|
||||||
|
|
||||||
export function getBackendBaseURL() {
|
export function getBackendBaseURL() {
|
||||||
return env.NEXT_PUBLIC_BACKEND_BASE_URL ?? "http://localhost:8000";
|
if (env.NEXT_PUBLIC_BACKEND_BASE_URL) {
|
||||||
|
return env.NEXT_PUBLIC_BACKEND_BASE_URL;
|
||||||
|
} else {
|
||||||
|
return "http://localhost:8000";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,10 +24,7 @@ export const env = createEnv({
|
|||||||
* `NEXT_PUBLIC_`.
|
* `NEXT_PUBLIC_`.
|
||||||
*/
|
*/
|
||||||
client: {
|
client: {
|
||||||
NEXT_PUBLIC_BACKEND_BASE_URL: z
|
NEXT_PUBLIC_BACKEND_BASE_URL: z.string().optional(),
|
||||||
.string()
|
|
||||||
.optional()
|
|
||||||
.default("http://localhost:8000/api"),
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user