Configureable contracts amount feature/35-contracts_per_runner #37

Merged
niggl merged 3 commits from feature/35-contracts_per_runner into dev 2021-03-14 15:31:28 +00:00
2 changed files with 5 additions and 0 deletions
Showing only changes of commit d01b4a0b99 - Show all commits

View File

@ -22,6 +22,7 @@ export class PdfCreator {
private templateDir = path.join(__dirname, '/templates'); private templateDir = path.join(__dirname, '/templates');
private browser; private browser;
private static interpolations = { eventname: config.eventname, sponsoring_receipt_minimum_amount: config.sponsoring_receipt_minimum_amount, currency_symbol: config.currency_symbol } private static interpolations = { eventname: config.eventname, sponsoring_receipt_minimum_amount: config.sponsoring_receipt_minimum_amount, currency_symbol: config.currency_symbol }
private static contractsPerRunner = config.contracts_per_runner;
/** /**
* Main constructor. * Main constructor.

View File

@ -13,11 +13,15 @@ export const config = {
sponor_logos: getSponsorLogos(), sponor_logos: getSponsorLogos(),
api_key: getApiKey(), api_key: getApiKey(),
disclaimer_text: process.env.DISCLAIMER_TEXT || "", disclaimer_text: process.env.DISCLAIMER_TEXT || "",
contracts_per_runner: process.env.CONTRACTS_PER_RUNNER || 1,
} }
let errors = 0 let errors = 0
if (typeof config.internal_port !== "number") { if (typeof config.internal_port !== "number") {
errors++ errors++
} }
if (typeof config.contracts_per_runner !== "number") {
errors++
}
if (typeof config.development !== "boolean") { if (typeof config.development !== "boolean") {
errors++ errors++
} }