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(server): wrong affine pro endpoint (#10144)

forehalo3f972036235b
diff --git a/packages/backend/server/src/plugins/license/service.ts b/packages/backend/server/src/plugins/license/service.ts
index 0f40bccb4a..cfadfdd22a 100644
--- a/packages/backend/server/src/plugins/license/service.ts
+++ b/packages/backend/server/src/plugins/license/service.ts
@@ -330,18 +330,17 @@ export class LicenseService implements OnModuleInit {
path: string,
init?: RequestInit
): Promise<T & { res: Response }> {
+ const endpoint =
+ process.env.AFFINE_PRO_SERVER_ENDPOINT ?? 'https://app.affine.pro';
+
try {
- const res = await fetch(
- process.env.AFFINE_PRO_SERVER_ENDPOINT ??
- 'https://app.affine.pro' + path,
- {
- ...init,
- headers: {
- 'Content-Type': 'application/json',
- ...init?.headers,
- },
- }
- );
+ const res = await fetch(endpoint + path, {
+ ...init,
+ headers: {
+ 'Content-Type': 'application/json',
+ ...init?.headers,
+ },
+ });
if (!res.ok) {
const body = (await res.json()) as UserFriendlyError;
diff --git a/packages/backend/server/src/plugins/payment/types.ts b/packages/backend/server/src/plugins/payment/types.ts
index 0e754bcca8..ac0497f9ee 100644
--- a/packages/backend/server/src/plugins/payment/types.ts
+++ b/packages/backend/server/src/plugins/payment/types.ts
@@ -215,7 +215,7 @@ export const DEFAULT_PRICES = new Map([
// team
[
`${SubscriptionPlan.Team}_${SubscriptionRecurring.Monthly}`,
- { product: 'AFFiNE Team(per seat)', price: 1440 },
+ { product: 'AFFiNE Team(per seat)', price: 1200 },
],
[
`${SubscriptionPlan.Team}_${SubscriptionRecurring.Yearly}`,
@@ -225,7 +225,7 @@ export const DEFAULT_PRICES = new Map([
// selfhost team
[
`${SubscriptionPlan.SelfHostedTeam}_${SubscriptionRecurring.Monthly}`,
- { product: 'AFFiNE Self-hosted Team(per seat)', price: 1440 },
+ { product: 'AFFiNE Self-hosted Team(per seat)', price: 1200 },
],
[
`${SubscriptionPlan.SelfHostedTeam}_${SubscriptionRecurring.Yearly}`,