Implemented more seeding feature/110-seeding #114

Merged
philipp merged 11 commits from feature/110-seeding into dev 2021-01-20 19:12:52 +00:00
Showing only changes of commit e12aedd1aa - Show all commits

View File

@ -10,7 +10,7 @@ export const config = {
phone_validation_countrycode: getPhoneCodeLocale(),
postalcode_validation_countrycode: getPostalCodeLocale(),
version: process.env.VERSION || require('../package.json').version,
seedTestData: JSON.parse(process.env.SEED_TEST_DATA) || false
seedTestData: getDataSeeding()
}
let errors = 0
if (typeof config.internal_port !== "number") {
@ -31,4 +31,11 @@ function getPostalCodeLocale(): any {
return null;
}
}
function getDataSeeding(): Boolean {
try {
return JSON.parse(process.env.SEED_TEST_DATA);
} catch (error) {
return false;
}
}
export let e = errors