fix(subs): establish lock to prevent race condition

This commit is contained in:
SabreCat
2022-11-01 20:47:21 -05:00
parent a2d5211b00
commit aea0be3245
18 changed files with 1146 additions and 720 deletions

View File

@@ -326,6 +326,7 @@ describe('Apple Payments', () => {
it('errors when a user is already subscribed', async () => {
payments.createSubscription.restore();
user = new User();
await user.save();
await applePayments.subscribe(sku, user, receipt, headers, nextPaymentProcessing);