Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.

Commit 2ce5239

Browse files
authored
Merge pull request #58 from topcoder-platform/hot-fix-markup
Extract markup metadata
2 parents b3d7bbe + f39b3ce commit 2ce5239

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/constants.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@ const supportedMetadata = {
6868
defaultValue: 0,
6969
description: 'DR points'
7070
},
71+
57: {
72+
method: metadataExtractor.extractMarkup,
73+
defaultValue: 0,
74+
description: 'Markup'
75+
},
7176
35: {
7277
method: metadataExtractor.extractSpecReviewCost,
7378
defaultValue: null,

src/utils/metadataExtractor.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ function extractBillingProject (challenge, defaultValue) {
1919
return _.get(challenge, 'billingAccountId', _.get(challenge, 'billing.billingAccountId', _.toString(defaultValue)))
2020
}
2121

22+
/**
23+
* Extract markup
24+
* @param {Object} challenge the challenge object
25+
* @param {Any} defaultValue the default value
26+
*/
27+
function extractMarkup (challenge, defaultValue) {
28+
return _.toString(_.get(challenge, 'billing.markup', defaultValue))
29+
}
30+
2231
/**
2332
* Extract submission limit
2433
* @param {Object} challenge the challenge object
@@ -182,6 +191,7 @@ function extractEstimateEffortOnsite (challenge, defaultValue) {
182191
}
183192

184193
module.exports = {
194+
extractMarkup,
185195
extractBillingProject,
186196
extractSubmissionLimit,
187197
extractSpecReviewCost,

0 commit comments

Comments
 (0)