From 21180ea0174e2c0ab06dc03144203282e7567dc0 Mon Sep 17 00:00:00 2001 From: YuehuCao Date: Mon, 13 Oct 2025 12:59:04 +0800 Subject: [PATCH] refactor(prefix): remove concrete prefix --- apps/authentication/.env | 2 +- .../backend/infra/api_key_introspect_handler.py | 4 ++-- apps/authentication/local.env | 2 +- apps/notification/.env | 2 +- apps/notification/backend/infra/api_key_introspect_handler.py | 4 ++-- apps/notification/tests/integration_tests/local.env | 4 ++-- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/apps/authentication/.env b/apps/authentication/.env index 14bcbae..21ba528 100644 --- a/apps/authentication/.env +++ b/apps/authentication/.env @@ -22,4 +22,4 @@ export MONGODB_URI=mongodb://localhost:27017/ export FREELEAPS_ENV=local export LOG_BASE_PATH=${CODEBASE_ROOT}/log -export AUTH_SERVICE_ENDPOINT=http://localhost:9000/api/v1/keys/ \ No newline at end of file +export AUTH_SERVICE_ENDPOINT=http://localhost:9000/api/v1/ \ No newline at end of file diff --git a/apps/authentication/backend/infra/api_key_introspect_handler.py b/apps/authentication/backend/infra/api_key_introspect_handler.py index ceb111e..eb3fde6 100644 --- a/apps/authentication/backend/infra/api_key_introspect_handler.py +++ b/apps/authentication/backend/infra/api_key_introspect_handler.py @@ -30,8 +30,8 @@ class ApiKeyIntrospectHandler: Raises: HTTPException: If the external service call fails """ - api_url = self.auth_service_base + "introspect_api_key" - await self.module_logger.log_info(f"Starting API Key validation for key: {api_key[:8]}...") + api_url = self.auth_service_base + "keys/introspect_api_key" + await self.module_logger.log_info(f"Starting API Key validation for key") async with httpx.AsyncClient() as client: response = await client.post( diff --git a/apps/authentication/local.env b/apps/authentication/local.env index 3220d32..78c57e6 100644 --- a/apps/authentication/local.env +++ b/apps/authentication/local.env @@ -1,7 +1,7 @@ APP_NAME=authentication export SERVICE_API_ACCESS_HOST=0.0.0.0 export SERVICE_API_ACCESS_PORT=8004 -export AUTH_SERVICE_ENDPOINT=http://localhost:9000/api/v1/keys/ +export AUTH_SERVICE_ENDPOINT=http://localhost:9000/api/v1/ export AUTH_SERVICE_PORT=9000 export CONTAINER_APP_ROOT=/app export LOG_BASE_PATH=$CONTAINER_APP_ROOT/log/$APP_NAME diff --git a/apps/notification/.env b/apps/notification/.env index 5070192..5e8560d 100644 --- a/apps/notification/.env +++ b/apps/notification/.env @@ -28,5 +28,5 @@ export RABBITMQ_PORT=5672 export FREELEAPS_ENV=local export LOG_BASE_PATH=${CODEBASE_ROOT}/log -export AUTH_SERVICE_ENDPOINT=http://localhost:9000/api/v1/keys/ +export AUTH_SERVICE_ENDPOINT=http://localhost:9000/api/v1/ export AUTH_SERVICE_PORT=9000 diff --git a/apps/notification/backend/infra/api_key_introspect_handler.py b/apps/notification/backend/infra/api_key_introspect_handler.py index ceb111e..eb3fde6 100644 --- a/apps/notification/backend/infra/api_key_introspect_handler.py +++ b/apps/notification/backend/infra/api_key_introspect_handler.py @@ -30,8 +30,8 @@ class ApiKeyIntrospectHandler: Raises: HTTPException: If the external service call fails """ - api_url = self.auth_service_base + "introspect_api_key" - await self.module_logger.log_info(f"Starting API Key validation for key: {api_key[:8]}...") + api_url = self.auth_service_base + "keys/introspect_api_key" + await self.module_logger.log_info(f"Starting API Key validation for key") async with httpx.AsyncClient() as client: response = await client.post( diff --git a/apps/notification/tests/integration_tests/local.env b/apps/notification/tests/integration_tests/local.env index b9a1142..957d0fd 100644 --- a/apps/notification/tests/integration_tests/local.env +++ b/apps/notification/tests/integration_tests/local.env @@ -5,7 +5,7 @@ export CONTAINER_APP_ROOT=/app export LOG_BASE_PATH=$CONTAINER_APP_ROOT/log/$APP_NAME export BACKEND_LOG_FILE_NAME=$APP_NAME export APPLICATION_ACTIVITY_LOG=$APP_NAME-activity -export SENDGRID_API_KEY=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 +export SENDGRID_API_KEY=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 export EMAIL_FROM=freeleaps@freeleaps.com export TWILIO_ACCOUNT_SID=ACf8c9283a6acda060258eadb29be58bc8 export TWILIO_AUTH_TOKEN=ef160748cc22c8b7195b49df4b8eca7e @@ -27,7 +27,7 @@ export DOCKER_BACKEND_LOG_HOME=$DOCKER_BACKEND_HOME/log export RABBITMQ_HOST=localhost export RABBITMQ_PORT=5672 -export AUTH_SERVICE_ENDPOINT=http://localhost:9000/api/v1/keys/ +export AUTH_SERVICE_ENDPOINT=http://localhost:9000/api/v1/ export TENANT_CACHE_MAX=64 # for local environment