mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-31 23:11:15 +00:00
fix check
This commit is contained in:
parent
c25b09c7ed
commit
31685c3e94
1 changed files with 1 additions and 1 deletions
|
|
@ -149,7 +149,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({
|
||||
|
|
|
|||
Loading…
Reference in a new issue