From 223955eb84fc83754cb99d084616753ccc5ced62 Mon Sep 17 00:00:00 2001 From: Julien Gautier Date: Sat, 25 Apr 2026 17:22:49 +0200 Subject: [PATCH] refactor(environment): rename config keys to camelCase Aligns environment.* shape with TypeScript convention. Renames: api_url -> apiBaseUrl, api_key -> apiKey, use_api_key -> useApiKey, refresh_interval -> refreshInterval, google_map_api_key -> googleMapApiKey. The local environment.{ts,development.ts,local.ts} files are gitignored and have already been migrated; this commit updates the tracked example file and the only consumer (apiInterceptor). --- src/app/core/interceptors/api.interceptor.ts | 2 +- src/environments/environment.example.ts | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/app/core/interceptors/api.interceptor.ts b/src/app/core/interceptors/api.interceptor.ts index a62f551..18aa53f 100644 --- a/src/app/core/interceptors/api.interceptor.ts +++ b/src/app/core/interceptors/api.interceptor.ts @@ -7,7 +7,7 @@ export const apiInterceptor: HttpInterceptorFn = (req, next) => { setHeaders: { ...({ 'Content-Type': 'application/json', 'Accept': 'application/json' }), }, - url: `${environment.api_url}${req.url}` + url: `${environment.apiBaseUrl}${req.url}` }); return next(apiReq); }; diff --git a/src/environments/environment.example.ts b/src/environments/environment.example.ts index 5e16bf6..d1ab3aa 100644 --- a/src/environments/environment.example.ts +++ b/src/environments/environment.example.ts @@ -1,8 +1,14 @@ export const environment = { - production: false, - api_url: 'http://localhost:3200/api', - api_key: '', - use_api_key: true, - refresh_interval: 30000, - google_map_api_key: '' + // Used by build system to enable dev mode optimizations + production: false, + // Note: Currently used via apiInterceptor. Deprecated: duplicate of apiUrl, consider removing + apiBaseUrl: 'http://localhost:3200/api', + // Reserved for API key-based authentication (not currently used, see useApiKey) + apiKey: '', + // Reserved for toggling between JWT and API key authentication (not currently used) + useApiKey: true, + // Reserved for data polling/refresh intervals (not currently used) + refreshInterval: 30000, + // Reserved for Google Maps API integration (not currently used) + googleMapApiKey: '' };