fix check

This commit is contained in:
Phillip Thelen
2022-10-21 16:59:18 +02:00
committed by Phillip Thelen
parent 9a40674d8d
commit b5f2e66025
+1 -1
View File
@@ -118,7 +118,7 @@ api.subscribe = async function subscribe (sku, user, receipt, headers, nextPayme
}
if (originalTransactionId) {
if (user && user.purchased.plan.customId !== originalTransactionId) {
if (user && user.isSubscribed() && user.purchased.plan.customId !== originalTransactionId) {
throw new NotAuthorized(this.constants.RESPONSE_ALREADY_USED);
}
const existingUser = await User.findOne({