From a21c298490c01cf3feed8f4152c16b8be068382c Mon Sep 17 00:00:00 2001 From: Krrupa <25496389+sudheshna-donthineni@users.noreply.github.com> Date: Thu, 21 Sep 2023 12:28:19 +0530 Subject: [PATCH 1/6] Update helpers.py --- app/helpers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/helpers.py b/app/helpers.py index 153f31a..3af0eae 100644 --- a/app/helpers.py +++ b/app/helpers.py @@ -36,4 +36,5 @@ def validate_and_build_query_params(data, valid_query_params): def db_request_token(): + print("token:", settings.token) return {"Authorization": f"Bearer {settings.token}"} From e3954b0db13f891610a122b93e8cdac9258363da Mon Sep 17 00:00:00 2001 From: Krrupa <25496389+sudheshna-donthineni@users.noreply.github.com> Date: Thu, 21 Sep 2023 13:58:43 +0530 Subject: [PATCH 2/6] Update form.py --- app/router/form.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/router/form.py b/app/router/form.py index 977a8af..278faa8 100644 --- a/app/router/form.py +++ b/app/router/form.py @@ -108,6 +108,7 @@ def get_form_schema(request: Request): query_params = helpers.validate_and_build_query_params( request.query_params, ["id", "name"] ) + print("token:", db_request_token()) response = requests.get( routes.form_db_url, params=query_params, headers=db_request_token() ) From 5a806b6c6c31c8325fe25b60f8d89ab79b644430 Mon Sep 17 00:00:00 2001 From: Krrupa <25496389+sudheshna-donthineni@users.noreply.github.com> Date: Thu, 21 Sep 2023 14:03:57 +0530 Subject: [PATCH 3/6] Update form.py --- app/router/form.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/router/form.py b/app/router/form.py index 278faa8..85590a9 100644 --- a/app/router/form.py +++ b/app/router/form.py @@ -108,7 +108,7 @@ def get_form_schema(request: Request): query_params = helpers.validate_and_build_query_params( request.query_params, ["id", "name"] ) - print("token:", db_request_token()) + response = requests.get( routes.form_db_url, params=query_params, headers=db_request_token() ) From 71de7fd26e8ea0746480b422dbe2a92a8fc5097b Mon Sep 17 00:00:00 2001 From: Krrupa <25496389+sudheshna-donthineni@users.noreply.github.com> Date: Thu, 21 Sep 2023 14:04:34 +0530 Subject: [PATCH 4/6] Update deploy_to_staging.yml --- .github/workflows/deploy_to_staging.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy_to_staging.yml b/.github/workflows/deploy_to_staging.yml index 2d02d60..c87e8b2 100644 --- a/.github/workflows/deploy_to_staging.yml +++ b/.github/workflows/deploy_to_staging.yml @@ -38,6 +38,7 @@ jobs: env: JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }} DB_SERVICE_URL: ${{ secrets.DB_SERVICE_URL }} + DB_SERVICE_TOKEN: ${{ secrets.DB_SERVICE_TOKEN }} run: sam deploy --stack-name PortalBackendStaging From aa9b153995324a596bd9222e6a4c2fb881bfbfd0 Mon Sep 17 00:00:00 2001 From: Krrupa <25496389+sudheshna-donthineni@users.noreply.github.com> Date: Thu, 21 Sep 2023 14:04:45 +0530 Subject: [PATCH 5/6] Update deploy_to_prod.yml --- .github/workflows/deploy_to_prod.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy_to_prod.yml b/.github/workflows/deploy_to_prod.yml index ad22140..6b29aa0 100644 --- a/.github/workflows/deploy_to_prod.yml +++ b/.github/workflows/deploy_to_prod.yml @@ -37,5 +37,6 @@ jobs: env: JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }} DB_SERVICE_URL: ${{ secrets.DB_SERVICE_URL }} + DB_SERVICE_TOKEN: ${{ secrets.DB_SERVICE_TOKEN }} run: sam deploy --stack-name PortalBackendProd --s3-bucket af-portal-backend --s3-prefix staging --no-confirm-changeset --no-fail-on-empty-changeset --region ap-south-1 --capabilities CAPABILITY_IAM --parameter-overrides 'JwtSecretKey=$JWT_SECRET_KEY DbServiceUrl=$DB_SERVICE_URL' From 269e4a3825aae667c161da6ac13a6fb5ea513d07 Mon Sep 17 00:00:00 2001 From: Krrupa <25496389+sudheshna-donthineni@users.noreply.github.com> Date: Thu, 21 Sep 2023 14:14:48 +0530 Subject: [PATCH 6/6] Update helpers.py --- app/helpers.py | 1 - 1 file changed, 1 deletion(-) diff --git a/app/helpers.py b/app/helpers.py index 3af0eae..153f31a 100644 --- a/app/helpers.py +++ b/app/helpers.py @@ -36,5 +36,4 @@ def validate_and_build_query_params(data, valid_query_params): def db_request_token(): - print("token:", settings.token) return {"Authorization": f"Bearer {settings.token}"}