mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-13 23:42:12 +00:00
more logging
This commit is contained in:
parent
32714e5d26
commit
e933914548
2 changed files with 4 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ api.iapAndroidVerify = {
|
|||
middlewares: [authWithUrl],
|
||||
async handler (req, res) {
|
||||
let resObject = await iapAndroidVerify(res.locals.user, req.body);
|
||||
console.log(resObject);
|
||||
return res
|
||||
.status(resObject.ok === true ? 200 : 500)
|
||||
.json(resObject);
|
||||
|
|
@ -43,6 +44,7 @@ api.iapiOSVerify = {
|
|||
middlewares: [authWithHeaders()],
|
||||
async handler (req, res) {
|
||||
let resObject = await iapIOSVerify(res.locals.user, req.body);
|
||||
console.log(resObject)
|
||||
return res
|
||||
.status(resObject.ok === true ? 200 : 500)
|
||||
.json(resObject);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ async function iapAndroidVerify (user, iapBody) {
|
|||
try {
|
||||
await iapSetup();
|
||||
|
||||
console.log('iapbody', JSON.stringify(iapBody));
|
||||
let testObj = {
|
||||
data: iapBody.transaction.receipt,
|
||||
signature: iapBody.transaction.signature,
|
||||
|
|
@ -34,6 +35,7 @@ async function iapAndroidVerify (user, iapBody) {
|
|||
googleRes = await iapValidate(iap.GOOGLE, testObj);
|
||||
|
||||
if (iap.isValidated(googleRes)) {
|
||||
console.log('test obj', JSON.stringify(testObj));
|
||||
token = testObj.data.token || testObj.data.purchaseToken;
|
||||
|
||||
let existingReceipt = await IapPurchaseReceipt.findOne({
|
||||
|
|
|
|||
Loading…
Reference in a new issue