refactor(env): replace inline process.env reads with BACKEND_URL in lib/#1415
Conversation
|
@VarunShukla07 is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
Replaced inline
process.env.NEXT_PUBLIC_FASTAPI_BACKEND_URLreads inlib/files withBACKEND_URLimported from@/lib/env-configMotivation and Context
FIX #1374
Screenshots
API Changes
Change Type
Testing Performed
Checklist
High-level PR Summary
This PR refactors the
lib/directory to eliminate inlineprocess.env.NEXT_PUBLIC_FASTAPI_BACKEND_URLreads by replacing them with a centralizedBACKEND_URLconstant imported from@/lib/env-config. The changes affect three files: the base API service initialization, authentication utilities (logout and token refresh functions), and thread persistence URL generation. This improves code maintainability by centralizing environment variable access and removes hardcoded fallback URLs.⏱️ Estimated Review Time: 5-15 minutes
💡 Review Order Suggestion
surfsense_web/lib/apis/base-api.service.tssurfsense_web/lib/auth-utils.tssurfsense_web/lib/chat/thread-persistence.ts