mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-27 19:25:15 +02:00
refactor(env): replace inline process.env reads with BACKEND_URL in lib/
This commit is contained in:
parent
8174949b38
commit
1fbb8fb58d
3 changed files with 7 additions and 10 deletions
|
|
@ -4,7 +4,7 @@
|
|||
*/
|
||||
|
||||
import { baseApiService } from "@/lib/apis/base-api.service";
|
||||
|
||||
import { BACKEND_URL } from "@/lib/env-config";
|
||||
// =============================================================================
|
||||
// Types matching backend schemas
|
||||
// =============================================================================
|
||||
|
|
@ -228,6 +228,5 @@ export interface RegenerateParams {
|
|||
* Get the URL for the regenerate endpoint (for streaming fetch)
|
||||
*/
|
||||
export function getRegenerateUrl(threadId: number): string {
|
||||
const backendUrl = process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URL || "http://localhost:8000";
|
||||
return `${backendUrl}/api/v1/threads/${threadId}/regenerate`;
|
||||
return `${BACKEND_URL}/api/v1/threads/${threadId}/regenerate`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue