mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 21:05:19 +00:00
fix(server): wrong previous subscription check (#10306)
This commit is contained in:
@@ -634,17 +634,6 @@ export class UserSubscriptionManager extends SubscriptionManager {
|
|||||||
EarlyAccessType.AI
|
EarlyAccessType.AI
|
||||||
);
|
);
|
||||||
|
|
||||||
// fast pass if the user is not early access for any plan
|
|
||||||
if (!proEarlyAccess && !aiEarlyAccess) {
|
|
||||||
return {
|
|
||||||
proEarlyAccess,
|
|
||||||
aiEarlyAccess,
|
|
||||||
proSubscribed: false,
|
|
||||||
aiSubscribed: false,
|
|
||||||
onetime: false,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
let proSubscribed = false;
|
let proSubscribed = false;
|
||||||
let aiSubscribed = false;
|
let aiSubscribed = false;
|
||||||
|
|
||||||
@@ -661,14 +650,12 @@ export class UserSubscriptionManager extends SubscriptionManager {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sub.status === 'past_due' || sub.status === 'canceled') {
|
if (lookupKey.plan === SubscriptionPlan.Pro) {
|
||||||
if (lookupKey.plan === SubscriptionPlan.Pro) {
|
proSubscribed = true;
|
||||||
proSubscribed = true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (lookupKey.plan === SubscriptionPlan.AI) {
|
if (lookupKey.plan === SubscriptionPlan.AI) {
|
||||||
aiSubscribed = true;
|
aiSubscribed = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user