mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-27 06:33:32 +03:00
fix(server): only returns active subscriptions (#6590)
This commit is contained in:
parent
c7373d4651
commit
5b315bfc81
@ -369,6 +369,7 @@ export class UserSubscriptionResolver {
|
||||
return this.db.userSubscription.findMany({
|
||||
where: {
|
||||
userId: user.id,
|
||||
status: SubscriptionStatus.Active,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
@ -765,7 +765,9 @@ export class SubscriptionService {
|
||||
);
|
||||
return {
|
||||
price,
|
||||
coupon: !subscribed ? CouponType.ProEarlyAccessOneYearFree : undefined,
|
||||
coupon: canHaveEADiscount
|
||||
? CouponType.ProEarlyAccessOneYearFree
|
||||
: undefined,
|
||||
};
|
||||
} else {
|
||||
const isAIEaUser = await this.features.isEarlyAccessUser(
|
||||
|
Loading…
Reference in New Issue
Block a user