Skip to content

Commit fba7b47

Browse files
Move topgear billing account ids to the environment variables
1 parent 42e9103 commit fba7b47

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

app-constants.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@ const prizeSetTypes = {
1818
CheckpointPrizes: 'checkpoint'
1919
}
2020

21-
const topGearBillingAccounts = [
22-
'80000062',
23-
'80002800'
24-
]
25-
2621
const challengeStatuses = {
2722
New: 'New',
2823
Draft: 'Draft',
@@ -145,6 +140,5 @@ module.exports = {
145140
DiscussionTypes,
146141
reviewTypes,
147142
SelfServiceNotificationTypes,
148-
SelfServiceNotificationSettings,
149-
topGearBillingAccounts
143+
SelfServiceNotificationSettings
150144
}

config/default.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ module.exports = {
7373
OBSERVER_ROLE_ID: process.env.OBSERVER_ROLE_ID || '2a4dc376-a31c-4d00-b173-13934d89e286',
7474
CLIENT_MANAGER_ROLE_ID: process.env.OBSERVER_ROLE_ID || '9b2f1905-8128-42da-85df-ed64410f4781',
7575

76+
// topgear billing accounts
77+
TOPGEAR_BILLING_ACCOUNTS_ID: process.env.TOPGEAR_BILLING_ACCOUNTS_ID ? process.env.TOPGEAR_BILLING_ACCOUNTS_ID.split(',') : [],
78+
7679
// health check timeout in milliseconds
7780
HEALTH_CHECK_TIMEOUT: process.env.HEALTH_CHECK_TIMEOUT || 3000,
7881

src/services/ChallengeService.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ async function update (currentUser, challengeId, data, isFull) {
14911491
_.set(data, 'billing.billingAccountId', billingAccountId)
14921492
_.set(data, 'billing.markup', markup || 0)
14931493
}
1494-
if (billingAccountId && _.includes(constants.topGearBillingAccounts, _.toString(billingAccountId))) {
1494+
if (billingAccountId && _.includes(config.TOPGEAR_BILLING_ACCOUNTS_ID, _.toString(billingAccountId))) {
14951495
if (_.isEmpty(data.metadata)) {
14961496
data.metadata = []
14971497
}

0 commit comments

Comments
 (0)