mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
better error handling and fix typo
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user