From c74fb59e5003013850c8dfef12eee53c0772618c Mon Sep 17 00:00:00 2001 From: "priyanka@TL" Date: Wed, 24 Jan 2024 18:11:44 +0530 Subject: [PATCH] clear env variables --- README.md | 9 --------- dev-ops/integration_test.env | 12 ------------ src/.env.sample | 15 --------------- src/configs/kafka.js | 2 +- src/envVariables.js | 21 --------------------- 5 files changed, 1 insertion(+), 58 deletions(-) diff --git a/README.md b/README.md index e60d0483f..02437da5e 100644 --- a/README.md +++ b/README.md @@ -170,9 +170,6 @@ Elevate user services can be setup in local using two methods: # Database connectivity url MONGODB_URL = mongodb://localhost:27017/db-name - # Number of rounds for encryption - SALT_ROUNDS = 10 - # Token secret to generate access token ACCESS_TOKEN_SECRET = 'access-token-secret' @@ -230,12 +227,6 @@ Elevate user services can be setup in local using two methods: # Internal access token for communicationcation between services via network call INTERNAL_ACCESS_TOKEN = 'internal-access-token' - # Mentor screct code for registering - MENTOR_SECRET_CODE = 'secret-code' - - #Enable logging of network request - ENABLE_LOG = true - # JWT Access Token expiry In Days ACCESS_TOKEN_EXPIRY = '1' diff --git a/dev-ops/integration_test.env b/dev-ops/integration_test.env index 2365ba6d1..9c9c6116c 100644 --- a/dev-ops/integration_test.env +++ b/dev-ops/integration_test.env @@ -9,10 +9,6 @@ APPLICATION_ENV = development # Database connectivity url MONGODB_URL = mongodb://mongo:27017/elevate-mentoring - -# Number of rounds for encryption -SALT_ROUNDS = 10 - # Token secret to generate access token ACCESS_TOKEN_SECRET = 'test' @@ -70,12 +66,6 @@ DEFAULT_AZURE_CONTAINER_NAME = 'azure-container-storage-name' # Internal access token for communicationcation between services via network call INTERNAL_ACCESS_TOKEN = 'internal-access-token' -# Mentor screct code for registering -MENTOR_SECRET_CODE = 'secret-code' - -#Enable logging of network request -ENABLE_LOG = true - # JWT Access Token expiry In Days ACCESS_TOKEN_EXPIRY = '1' @@ -102,8 +92,6 @@ SUPPORT_EMAIL_ID = 'support@xyz.com,team@xyz.com' #Email template code for reported issue. REPORT_ISSUE_EMAIL_TEMPLATE_CODE = 'user_issue_reported' -#kafka rating topic -RATING_KAFKA_TOPIC = 'Rating' #Internal cache expiry time INTERNAL_CACHE_EXP_TIME = 86400 diff --git a/src/.env.sample b/src/.env.sample index 35d04d684..3f3e71554 100644 --- a/src/.env.sample +++ b/src/.env.sample @@ -9,9 +9,6 @@ APPLICATION_ENV = development # Database connectivity url MONGODB_URL = mongodb://localhost:27017/db-name -# Number of rounds for encryption -SALT_ROUNDS = 10 - # Token secret to generate access token ACCESS_TOKEN_SECRET = 'access-token-secret' @@ -84,9 +81,6 @@ OCI_BUCKET_REGION= 'ap-hyderabad-1' # Internal access token for communicationcation between services via network call INTERNAL_ACCESS_TOKEN = 'internal-access-token' -# Mentor screct code for registering -MENTOR_SECRET_CODE = 'secret-code' - # JWT Access Token expiry In Days ACCESS_TOKEN_EXPIRY = '1' @@ -105,9 +99,6 @@ ENABLE_EMAIL_OTP_VERIFICATION = true # Api doc url API_DOC_URL = '/api-doc' -#kafka rating topic -RATING_KAFKA_TOPIC = 'Rating' - #Internal cache expiry time INTERNAL_CACHE_EXP_TIME = 86400 @@ -144,12 +135,6 @@ MENTORING_SERVICE_URL=http://localhost:3000 #Default queue for process invitee upload DEFAULT_QUEUE=user-queue -#Email template for mentor invitation -MENTOR_INVITATION_EMAIL_TEMPLATE_CODE=invite_mentor - -#Email template for mentee invitation -MENTEE_INVITATION_EMAIL_TEMPLATE_CODE=invite_mentee - #Email template for mentor role request accepted MENTOR_REQUEST_ACCEPTED_EMAIL_TEMPLATE_CODE=mentor_request_accepted diff --git a/src/configs/kafka.js b/src/configs/kafka.js index 173d96467..6e4017d6c 100644 --- a/src/configs/kafka.js +++ b/src/configs/kafka.js @@ -36,7 +36,7 @@ module.exports = async () => { }) const subscribeToConsumer = async () => { - await consumer.subscribe({ topics: [process.env.RATING_KAFKA_TOPIC, process.env.CLEAR_INTERNAL_CACHE] }) + await consumer.subscribe({ topics: [process.env.CLEAR_INTERNAL_CACHE] }) await consumer.run({ eachMessage: async ({ topic, partition, message }) => { try { diff --git a/src/envVariables.js b/src/envVariables.js index 44d5f78da..9e0bb7c2a 100644 --- a/src/envVariables.js +++ b/src/envVariables.js @@ -15,10 +15,6 @@ let enviromentVariables = { message: 'Required mongodb url', optional: false, }, - SALT_ROUNDS: { - message: 'Required salt rounds for encryption', - optional: false, - }, ACCESS_TOKEN_SECRET: { message: 'Required access token secret', optional: false, @@ -103,10 +99,6 @@ let enviromentVariables = { message: 'Required azure container name', optional: process.env.CLOUD_STORAGE === 'AZURE' ? false : true, }, - MENTOR_SECRET_CODE: { - message: 'Required mentor secret code', - optional: false, - }, ACCESS_TOKEN_EXPIRY: { message: 'Required access token expiry in days', optional: false, @@ -123,11 +115,6 @@ let enviromentVariables = { message: 'Internal Cache Expiry Time', optional: false, }, - - RATING_KAFKA_TOPIC: { - message: 'Kafka Rating Topic', - optional: false, - }, REDIS_HOST: { message: 'Redis Host Url', optional: false, @@ -189,14 +176,6 @@ let enviromentVariables = { message: 'Required Mentoring Service Url', optional: false, }, - MENTOR_INVITATION_EMAIL_TEMPLATE_CODE: { - message: 'Required mentor invitation email template code', - optional: false, - }, - MENTEE_INVITATION_EMAIL_TEMPLATE_CODE: { - message: 'Required mentee invitation email template code', - optional: false, - }, ADMIN_INVITEE_UPLOAD_EMAIL_TEMPLATE_CODE: { message: 'Required admin upload invitee email template code', optional: false,