mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-22 05:38:46 +00:00
add extra logging for ios/verify
This commit is contained in:
parent
e0fbfffbf2
commit
81d3e8a68f
1 changed files with 7 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ import {
|
|||
} from '../../../libs/errors';
|
||||
import googlePayments from '../../../libs/googlePayments';
|
||||
import applePayments from '../../../libs/applePayments';
|
||||
import logger from '../../../libs/logger';
|
||||
|
||||
let api = {};
|
||||
|
||||
|
|
@ -87,6 +88,12 @@ api.iapiOSVerify = {
|
|||
url: '/iap/ios/verify',
|
||||
middlewares: [authWithHeaders()],
|
||||
async handler (req, res) {
|
||||
// @TODO remove once debugging is done
|
||||
logger.info('Debugging iOS verify route', {
|
||||
body: req.body,
|
||||
headers: req.headers,
|
||||
});
|
||||
|
||||
if (!req.body.transaction) throw new BadRequest(res.t('missingReceipt'));
|
||||
|
||||
let appleRes = await applePayments.verifyGemPurchase(res.locals.user, req.body.transaction.receipt, req.headers);
|
||||
|
|
|
|||
Loading…
Reference in a new issue