fix(server): only auto apply coupon in pro subscription (#6452)

This commit is contained in:
liuyi
2024-04-03 17:13:18 +08:00
committed by GitHub
parent 6fa4b7da54
commit edef9b2735

View File

@@ -116,7 +116,7 @@ export class SubscriptionService {
discount ??= {}; discount ??= {};
discount.promotion_code = code; discount.promotion_code = code;
} }
} else { } else if (plan === SubscriptionPlan.Pro) {
const coupon = await this.getAvailableCoupon( const coupon = await this.getAvailableCoupon(
user, user,
CouponType.EarlyAccess CouponType.EarlyAccess