Skip to content

Conversation

@danoswaltCL
Copy link
Collaborator

No description provided.

@danoswaltCL danoswaltCL requested review from bcb37, Copilot and zackcl and removed request for bcb37 and Copilot December 11, 2025 21:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the API endpoint management by removing the api property from all environment configuration files and centralizing API endpoint paths into a single, reusable constant file.

Key Changes:

  • Created a new API_ENDPOINTS constant in api-endpoints.constants.ts containing all API endpoint paths
  • Removed the api property and APIEndpoints interface from environment configuration files
  • Updated all data services to import and use API_ENDPOINTS instead of injecting environment for API paths
  • Updated corresponding test files to remove environment dependency for API endpoints

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
frontend/projects/upgrade/src/app/core/api-endpoints.constants.ts New file containing centralized API endpoint paths as a const object
frontend/projects/upgrade/src/environments/environment-types.ts Removed APIEndpoints interface and api property from Environment interface
frontend/projects/upgrade/src/environments/environment.ts Removed api object containing 62 endpoint definitions
frontend/projects/upgrade/src/environments/environment.staging.ts Removed api object containing 62 endpoint definitions
frontend/projects/upgrade/src/environments/environment.qa.ts Removed api object containing 62 endpoint definitions
frontend/projects/upgrade/src/environments/environment.prod.ts Removed api object containing 62 endpoint definitions
frontend/projects/upgrade/src/environments/environment.local.example.ts Removed api object containing 62 endpoint definitions
frontend/projects/upgrade/src/environments/environment.demo.prod.ts Removed api object containing 62 endpoint definitions
frontend/projects/upgrade/src/environments/environment.bsnl.ts Removed api object containing 62 endpoint definitions
frontend/projects/upgrade/src/app/core/version/version.service.ts Updated to use API_ENDPOINTS instead of injecting environment
frontend/projects/upgrade/src/app/core/version/version.service.spec.ts Updated test to use API_ENDPOINTS and removed environment mock
frontend/projects/upgrade/src/app/core/users/users.data.service.ts Updated to use API_ENDPOINTS instead of injecting environment
frontend/projects/upgrade/src/app/core/users/users.data.service.spec.ts Updated test to use API_ENDPOINTS and removed environment mock
frontend/projects/upgrade/src/app/core/stratification-factors/stratification-factors.data.service.ts Updated to use API_ENDPOINTS instead of injecting environment
frontend/projects/upgrade/src/app/core/stratification-factors/stratification-factors.data.service.spec.ts Updated test to use API_ENDPOINTS and removed environment mock
frontend/projects/upgrade/src/app/core/settings/settings.data.service.ts Updated to use API_ENDPOINTS instead of injecting environment
frontend/projects/upgrade/src/app/core/settings/settings.data.service.spec.ts Updated test to use API_ENDPOINTS and removed environment mock
frontend/projects/upgrade/src/app/core/segments/segments.data.service.ts Updated to use API_ENDPOINTS instead of injecting environment
frontend/projects/upgrade/src/app/core/segments/segments.data.service.spec.ts Updated test to use API_ENDPOINTS and removed environment mock
frontend/projects/upgrade/src/app/core/preview-users/preview-users.data.service.ts Updated to use API_ENDPOINTS instead of injecting environment
frontend/projects/upgrade/src/app/core/preview-users/preview-users.data.service.spec.ts Updated test to use API_ENDPOINTS and removed environment mock
frontend/projects/upgrade/src/app/core/logs/logs.data.service.ts Updated to use API_ENDPOINTS instead of injecting environment
frontend/projects/upgrade/src/app/core/logs/logs.data.service.spec.ts Updated test to use API_ENDPOINTS and removed environment mock
frontend/projects/upgrade/src/app/core/feature-flags/feature-flags.data.service.ts Updated to use API_ENDPOINTS instead of injecting environment
frontend/projects/upgrade/src/app/core/experiments/experiments.data.service.ts Updated to use API_ENDPOINTS instead of injecting environment
frontend/projects/upgrade/src/app/core/experiments/experiments.data.service.spec.ts Updated test to use API_ENDPOINTS and removed environment mock
frontend/projects/upgrade/src/app/core/auth/auth.data.service.ts Updated to use API_ENDPOINTS instead of injecting environment
frontend/projects/upgrade/src/app/core/analysis/analysis.data.service.ts Updated to use API_ENDPOINTS instead of injecting environment
frontend/projects/upgrade/src/app/core/analysis/analysis.data.service.spec.ts Updated test to use API_ENDPOINTS and removed environment mock

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants