mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-19 19:16:29 +08:00
fix(server): wrong affine pro endpoint (#10144)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user