Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: quota switch (#10347)

DarkSky24fa58df522c
diff --git a/packages/backend/server/src/plugins/payment/quota.ts b/packages/backend/server/src/plugins/payment/quota.ts
index 2f6e8dabfd..82aca644d1 100644
--- a/packages/backend/server/src/plugins/payment/quota.ts
+++ b/packages/backend/server/src/plugins/payment/quota.ts
@@ -74,7 +74,7 @@ export class QuotaOverride {
);
break;
case SubscriptionPlan.Pro:
- await this.models.userFeature.add(
+ await this.models.userFeature.switchQuota(
userId,
recurring === 'lifetime' ? 'lifetime_pro_plan_v1' : 'pro_plan_v1',
'subscription activated'