better error handling and fix typo

This commit is contained in:
Matteo Pagliazzi
2016-07-01 12:37:29 +02:00
parent 1492a8af0d
commit 75df284967
2 changed files with 4 additions and 4 deletions

View File

@@ -44,7 +44,7 @@ async function iapAndroidVerify (user, iapBody) {
await IapPurchaseReceipt.create({
_id: token,
consumed: true,
userID: user._id,
userId: user._id,
});
await payments.buyGems({
@@ -98,7 +98,7 @@ async function iapIOSVerify (user, iapBody) {
await IapPurchaseReceipt.create({
_id: token,
consumed: true,
userID: user._id,
userId: user._id,
});
} else {
throw new Error('RECEIPT_ALREADY_USED');