fix(payments): customerId query

This commit is contained in:
Sabe Jones 2017-02-02 19:51:52 +00:00
parent 32c7f40c4b
commit 7a534ab81d

View file

@ -107,7 +107,7 @@ api.subscribe = async function subscribe (sku, user, receipt, signature, headers
let token = receiptObj.token || receiptObj.purchaseToken;
let existingUser = await User.findOne({
'payments.plan.customerId': token,
'purchased.plan.customerId': token,
}).exec();
if (existingUser) throw new NotAuthorized(this.constants.RESPONSE_ALREADY_USED);