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

Commit 9b4ff0a

Browse files
author
James Cori
committed
Adding Admin Fee Default 0
2 parents 2ce5239 + 5bf6f2d commit 9b4ff0a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

Diff for: src/constants.js

+5
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ const supportedMetadata = {
6363
defaultValue: null,
6464
description: 'Billing Project'
6565
},
66+
31: {
67+
method: metadataExtractor.extractAdminFee,
68+
defaultValue: 0,
69+
description: 'Admin Fee'
70+
},
6671
30: {
6772
method: metadataExtractor.extractDrPoints,
6873
defaultValue: 0,

Diff for: src/utils/metadataExtractor.js

+11
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ function extractMarkup (challenge, defaultValue) {
2828
return _.toString(_.get(challenge, 'billing.markup', defaultValue))
2929
}
3030

31+
/**
32+
* Extract Admin Fee
33+
* @param {Object} challenge the challenge object
34+
* @param {Any} defaultValue the default value
35+
*/
36+
function extractAdminFee (challenge, defaultValue) {
37+
// TODO for now just return 0
38+
return _.toString(_.get(challenge, 0, defaultValue))
39+
}
40+
3141
/**
3242
* Extract submission limit
3343
* @param {Object} challenge the challenge object
@@ -192,6 +202,7 @@ function extractEstimateEffortOnsite (challenge, defaultValue) {
192202

193203
module.exports = {
194204
extractMarkup,
205+
extractAdminFee,
195206
extractBillingProject,
196207
extractSubmissionLimit,
197208
extractSpecReviewCost,

0 commit comments

Comments
 (0)