mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-18 03:52:54 +00:00
fix(payments): customerId query
This commit is contained in:
parent
32c7f40c4b
commit
7a534ab81d
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue