try something

This commit is contained in:
Phillip Thelen 2023-02-28 16:17:52 +01:00
parent def24142ca
commit 6887fd70c0

View file

@ -137,7 +137,7 @@ api.subscribe = async function subscribe (user, receipt, headers, nextPaymentPro
throw new NotAuthorized(this.constants.RESPONSE_ALREADY_USED);
}
for (const existingUser of existingUsers) {
if (existingUser._id !== user._id) {
if (existingUser._id !== user._id && !existingUser.purchased.plan.dateTerminated) {
throw new NotAuthorized(this.constants.RESPONSE_ALREADY_USED);
}
}