From 63b8e644596ae480f90a9debe5103ce3fa4e366c Mon Sep 17 00:00:00 2001 From: Bilal Catic Date: Thu, 5 Sep 2019 09:31:35 +0200 Subject: [PATCH] add ENV variable and load to the system to use custom prefixes --- constants/constants.js | 3 +++ environment.env | 2 ++ 2 files changed, 5 insertions(+) diff --git a/constants/constants.js b/constants/constants.js index 222f0cd..3c9f7f2 100644 --- a/constants/constants.js +++ b/constants/constants.js @@ -123,6 +123,8 @@ const discounts = { }; const DISCOUNT_PLANS = process.env.DISCOUNT_PLANS.split(',').map(planName => planName.trim()) || []; +const CUSTOM_FEES_PREFIXES = process.env.CUSTOM_FEES_PREFIXES.split(',').map(prefix => prefix.trim()) || []; + const UNPAID_FEE_STATUS = 'not_paid'; module.exports = { @@ -148,4 +150,5 @@ module.exports = { discounts, DISCOUNT_PLANS, UNPAID_FEE_STATUS, + CUSTOM_FEES_PREFIXES, }; diff --git a/environment.env b/environment.env index d128134..826e022 100644 --- a/environment.env +++ b/environment.env @@ -37,6 +37,8 @@ ORD_OAUTH_CLIENT_ID=Client ID for this app, created in ORD; Used to obtain OAUTH ORD_OAUTH_CLIENT_SECRET=Client secret for this app; Used to obtain OAUTH token ORD_OAUTH_URL=https://identity.officernd.com/oauth/token +CUSTOM_FEES_PREFIXES=Array of prefixes to recognize manually added fees. Comma-separated + #More about pool option : http://docs.sequelizejs.com/class/lib/sequelize.js~Sequelize.html DB_POOL_MAX_CONNECTIONS=Maximum number of connection in pool (ex. 18) DB_POOL_ACQUIRE=The maximum time, in milliseconds, that pool will try to get connection before throwing error (ex. 120000)