Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fixed subscription is not applied when created

Blue Mousea57d56f46643
diff --git a/src/user/entities/user.entity.ts b/src/user/entities/user.entity.ts
index 073ed075a..27253368c 100644
--- a/src/user/entities/user.entity.ts
+++ b/src/user/entities/user.entity.ts
@@ -21,21 +21,21 @@ export const ACCOUNT_PLANS = {
displayName: 'Freelancer plan',
monthlyUsageLimit: 100000,
maxProjects: 20,
- pid: 752316,
+ pid: '752316',
},
startup: {
id: PlanCode.startup,
displayName: 'Startup plan',
monthlyUsageLimit: 500000,
maxProjects: 20,
- pid: 752317,
+ pid: '752317',
},
enterprise: {
id: PlanCode.enterprise,
displayName: 'Enterprise plan',
monthlyUsageLimit: 1000000,
maxProjects: 30,
- pid: 752318,
+ pid: '752318',
},
}
@@ -99,8 +99,8 @@ export class User {
@Column({ type: 'timestamp', nullable: true })
exportedAt: Date
- @Column('int', { nullable: true })
- subID: number
+ @Column('varchar', { length: 15, nullable: true })
+ subID: string
@Column('varchar', { length: 200, nullable: true })
subUpdateURL: string
diff --git a/src/user/user.service.ts b/src/user/user.service.ts
index b29fb0d9d..fbed23ba6 100644
--- a/src/user/user.service.ts
+++ b/src/user/user.service.ts
@@ -39,7 +39,7 @@ export class UserService {
return this.usersRepository.update({ email }, update)
}
- async updateBySubID(subID: number, update: Record<string, unknown>): Promise<any> {
+ async updateBySubID(subID: string, update: Record<string, unknown>): Promise<any> {
return this.usersRepository.update({ subID }, update)
}