Removed calls to console.log

refs https://github.com/TryGhost/Team/issues/879
This commit is contained in:
Fabien O'Carroll 2021-07-14 11:37:43 +01:00
parent 6083e4825f
commit e39016423e
3 changed files with 8 additions and 4 deletions

View File

@ -151,7 +151,8 @@ module.exports = function MembersApi({
checkoutCancelUrl: stripeConfig.checkoutCancelUrl, checkoutCancelUrl: stripeConfig.checkoutCancelUrl,
billingSuccessUrl: stripeConfig.billingSuccessUrl, billingSuccessUrl: stripeConfig.billingSuccessUrl,
billingCancelUrl: stripeConfig.billingCancelUrl billingCancelUrl: stripeConfig.billingCancelUrl
} },
logging: common.logging
}); });
const ready = paymentConfig.stripe ? Promise.all([ const ready = paymentConfig.stripe ? Promise.all([

View File

@ -13,6 +13,7 @@ const errors = require('@tryghost/ignition-errors');
* @param {any} deps.stripeAPIService * @param {any} deps.stripeAPIService
* @param {any} deps.tokenService * @param {any} deps.tokenService
* @param {any} deps.config * @param {any} deps.config
* @param {any} deps.logging
*/ */
module.exports = class RouterController { module.exports = class RouterController {
constructor({ constructor({
@ -23,7 +24,8 @@ module.exports = class RouterController {
stripeAPIService, stripeAPIService,
tokenService, tokenService,
sendEmailWithMagicLink, sendEmailWithMagicLink,
config config,
logging
}) { }) {
this._memberRepository = memberRepository; this._memberRepository = memberRepository;
this._StripePrice = StripePrice; this._StripePrice = StripePrice;
@ -33,6 +35,7 @@ module.exports = class RouterController {
this._tokenService = tokenService; this._tokenService = tokenService;
this._sendEmailWithMagicLink = sendEmailWithMagicLink; this._sendEmailWithMagicLink = sendEmailWithMagicLink;
this._config = config; this._config = config;
this._logging = logging;
} }
async ensureStripe(_req, res, next) { async ensureStripe(_req, res, next) {
@ -182,7 +185,7 @@ module.exports = class RouterController {
break; break;
} }
} catch (err) { } catch (err) {
console.log('Ignoring error for fetching customer for checkout'); this._logging.info('Ignoring error for fetching customer for checkout');
} }
} }

View File

@ -633,7 +633,7 @@ module.exports = class MemberRepository {
const fetchedCustomer = await this._stripeAPIService.getCustomer(customer.get('customer_id')); const fetchedCustomer = await this._stripeAPIService.getCustomer(customer.get('customer_id'));
stripeCustomer = fetchedCustomer; stripeCustomer = fetchedCustomer;
} catch (err) { } catch (err) {
console.log('Ignoring error for fetching customer for checkout'); this._logging.info('Ignoring error for fetching customer for checkout');
} }
} }