mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-18 14:56:59 +08:00
fix(server): only returns active subscriptions (#6590)
This commit is contained in:
@@ -369,6 +369,7 @@ export class UserSubscriptionResolver {
|
|||||||
return this.db.userSubscription.findMany({
|
return this.db.userSubscription.findMany({
|
||||||
where: {
|
where: {
|
||||||
userId: user.id,
|
userId: user.id,
|
||||||
|
status: SubscriptionStatus.Active,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -765,7 +765,9 @@ export class SubscriptionService {
|
|||||||
);
|
);
|
||||||
return {
|
return {
|
||||||
price,
|
price,
|
||||||
coupon: !subscribed ? CouponType.ProEarlyAccessOneYearFree : undefined,
|
coupon: canHaveEADiscount
|
||||||
|
? CouponType.ProEarlyAccessOneYearFree
|
||||||
|
: undefined,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
const isAIEaUser = await this.features.isEarlyAccessUser(
|
const isAIEaUser = await this.features.isEarlyAccessUser(
|
||||||
|
|||||||
Reference in New Issue
Block a user