Linting
parent
807ab4d32c
commit
22626c0873
9
app.js
9
app.js
|
@ -31,9 +31,8 @@ if(baseConfig === false){
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate the payment gateway config
|
// Validate the payment gateway config
|
||||||
switch(config.paymentGateway)
|
switch(config.paymentGateway){
|
||||||
{
|
case'paypal':
|
||||||
case 'paypal':
|
|
||||||
const paypalConfig = ajv.validate(require('./config/paypalSchema'), require('./config/paypal.json'));
|
const paypalConfig = ajv.validate(require('./config/paypalSchema'), require('./config/paypal.json'));
|
||||||
if(paypalConfig === false){
|
if(paypalConfig === false){
|
||||||
console.log(colors.red(`PayPal config is incorrect: ${ajv.errorsText()}`));
|
console.log(colors.red(`PayPal config is incorrect: ${ajv.errorsText()}`));
|
||||||
|
@ -41,7 +40,7 @@ switch(config.paymentGateway)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'stripe':
|
case'stripe':
|
||||||
const stripeConfig = ajv.validate(require('./config/stripeSchema'), require('./config/stripe.json'));
|
const stripeConfig = ajv.validate(require('./config/stripeSchema'), require('./config/stripe.json'));
|
||||||
if(stripeConfig === false){
|
if(stripeConfig === false){
|
||||||
console.log(colors.red(`Stripe config is incorrect: ${ajv.errorsText()}`));
|
console.log(colors.red(`Stripe config is incorrect: ${ajv.errorsText()}`));
|
||||||
|
@ -49,7 +48,7 @@ switch(config.paymentGateway)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'authorizenet':
|
case'authorizenet':
|
||||||
const authorizenetConfig = ajv.validate(require('./config/authorizenetSchema'), require('./config/authorizenet.json'));
|
const authorizenetConfig = ajv.validate(require('./config/authorizenetSchema'), require('./config/authorizenet.json'));
|
||||||
if(authorizenetConfig === false){
|
if(authorizenetConfig === false){
|
||||||
console.log(colors.red(`Authorizenet config is incorrect: ${ajv.errorsText()}`));
|
console.log(colors.red(`Authorizenet config is incorrect: ${ajv.errorsText()}`));
|
||||||
|
|
Loading…
Reference in New Issue